vega_lite_5/
schema.rs

1// Licensed under the Apache License, Version 2.0 (the "License");
2// you may not use this file except in compliance with the License.
3// You may obtain a copy of the License at
4//
5//     https://www.apache.org/licenses/LICENSE-2.0
6//
7// Unless required by applicable law or agreed to in writing, software
8// distributed under the License is distributed on an "AS IS" BASIS,
9// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10// See the License for the specific language governing permissions and
11// limitations under the License.
12
13#![allow(
14    missing_docs,
15    clippy::doc_lazy_continuation,
16    clippy::large_enum_variant
17)]
18
19use crate::removable_value::RemovableValue;
20use derive_builder::Builder;
21use derive_more::From;
22use serde::{Deserialize, Serialize};
23use std::collections::HashMap;
24
25/// A Vega-Lite top-level specification. This is the root class for all Vega-Lite
26/// specifications. (The json schema is generated from this type.)
27#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
28#[builder(setter(into, strip_option))]
29pub struct Vegalite {
30    /// URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you
31    /// have a reason to change this, use `https://vega.github.io/schema/vega-lite/v5.json`.
32    /// Setting the `$schema` property allows automatic validation and autocomplete in editors
33    /// that support JSON schema.
34    #[serde(rename = "$schema")]
35    #[serde(skip_serializing_if = "Option::is_none")]
36    #[builder(default = "Some(\"https://vega.github.io/schema/vega-lite/v5.json\".to_string())")]
37    pub schema: Option<String>,
38    /// The alignment to apply to grid rows and columns. The supported string values are `"all"`,
39    /// `"each"`, and `"none"`.
40    ///
41    /// - For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed
42    /// one after the other.
43    /// - For `"each"`, subviews will be aligned into a clean grid structure, but each row or
44    /// column may be of variable size.
45    /// - For `"all"`, subviews will be aligned and each row or column will be sized identically
46    /// based on the maximum observed size. String values for this property will be applied to
47    /// both grid rows and columns.
48    ///
49    /// Alternatively, an object value of the form `{"row": string, "column": string}` can be
50    /// used to supply different alignments for rows and columns.
51    ///
52    /// __Default value:__ `"all"`.
53    #[serde(skip_serializing_if = "Option::is_none")]
54    #[builder(default)]
55    pub align: Option<Box<VegaliteAlign>>,
56    /// How the visualization size should be determined. If a string, should be one of `"pad"`,
57    /// `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing
58    /// and automatic resizing.
59    ///
60    /// __Default value__: `pad`
61    #[serde(skip_serializing_if = "Option::is_none")]
62    #[builder(default)]
63    pub autosize: Option<Box<Autosize>>,
64    /// CSS color property to use as the background of the entire view.
65    ///
66    /// __Default value:__ `"white"`
67    #[serde(skip_serializing_if = "Option::is_none")]
68    #[builder(default)]
69    pub background: Option<Box<Color>>,
70    /// The bounds calculation method to use for determining the extent of a sub-plot. One of
71    /// `full` (the default) or `flush`.
72    ///
73    /// - If set to `full`, the entire calculated bounds (including axes, title, and legend) will
74    /// be used.
75    /// - If set to `flush`, only the specified width and height values for the sub-view will be
76    /// used. The `flush` setting can be useful when attempting to place sub-plots without axes
77    /// or legends into a uniform grid structure.
78    ///
79    /// __Default value:__ `"full"`
80    #[serde(skip_serializing_if = "Option::is_none")]
81    #[builder(default)]
82    pub bounds: Option<Box<Bounds>>,
83    /// Boolean flag indicating if subviews should be centered relative to their respective rows
84    /// or columns.
85    ///
86    /// An object value of the form `{"row": boolean, "column": boolean}` can be used to supply
87    /// different centering values for rows and columns.
88    ///
89    /// __Default value:__ `false`
90    ///
91    /// Boolean flag indicating if subviews should be centered relative to their respective rows
92    /// or columns.
93    ///
94    /// __Default value:__ `false`
95    #[serde(skip_serializing_if = "Option::is_none")]
96    #[builder(default)]
97    pub center: Option<Box<Center>>,
98    /// Vega-Lite configuration object. This property can only be defined at the top-level of a
99    /// specification.
100    #[serde(skip_serializing_if = "Option::is_none")]
101    #[builder(default)]
102    pub config: Option<Box<ConfigClass>>,
103    /// An object describing the data source. Set to `null` to ignore the parent's data source.
104    /// If no data is set, it is derived from the parent.
105    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
106    #[builder(default)]
107    pub data: RemovableValue<UrlData>,
108    /// A global data store for named datasets. This is a mapping from names to inline datasets.
109    /// This can be an array of objects or primitive values or a string. Arrays of primitive
110    /// values are ingested as objects with a `data` property.
111    #[serde(skip_serializing_if = "Option::is_none")]
112    #[builder(default)]
113    pub datasets: Option<HashMap<String, InlineDatasetValue>>,
114    /// Description of this mark for commenting purpose.
115    #[serde(skip_serializing_if = "Option::is_none")]
116    #[builder(default)]
117    pub description: Option<String>,
118    /// A key-value mapping between encoding channels and definition of fields.
119    ///
120    /// A shared key-value mapping between encoding channels and definition of fields in the
121    /// underlying layers.
122    #[serde(skip_serializing_if = "Option::is_none")]
123    #[builder(default)]
124    pub encoding: Option<Box<EdEncoding>>,
125    /// The height of a visualization.
126    ///
127    /// - For a plot with a continuous y-field, height should be a number.
128    /// - For a plot with either a discrete y-field or no y-field, height can be either a number
129    /// indicating a fixed height or an object in the form of `{step: number}` defining the
130    /// height per discrete step. (No y-field is equivalent to having one discrete step.)
131    /// - To enable responsive sizing on height, it should be set to `"container"`.
132    ///
133    /// __Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous
134    /// y-field and `config.view.discreteHeight` otherwise.
135    ///
136    /// __Note:__ For plots with [`row` and `column`
137    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
138    /// height of a single view and the `"container"` option cannot be used.
139    ///
140    /// __See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.
141    #[serde(skip_serializing_if = "Option::is_none")]
142    #[builder(default)]
143    pub height: Option<SpecHeight>,
144    /// A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
145    /// `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark
146    /// definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
147    #[serde(skip_serializing_if = "Option::is_none")]
148    #[builder(default)]
149    pub mark: Option<AnyMark>,
150    /// Name of the visualization for later reference.
151    #[serde(skip_serializing_if = "Option::is_none")]
152    #[builder(default)]
153    pub name: Option<String>,
154    /// The default visualization padding, in pixels, from the edge of the visualization canvas
155    /// to the data rectangle. If a number, specifies padding for all sides. If an object, the
156    /// value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify
157    /// padding for each side of the visualization.
158    ///
159    /// __Default value__: `5`
160    #[serde(skip_serializing_if = "Option::is_none")]
161    #[builder(default)]
162    pub padding: Option<Box<Padding>>,
163    /// An array of parameters that may either be simple variables, or more complex selections
164    /// that map user input to data queries.
165    ///
166    /// Dynamic variables or selections that parameterize a visualization.
167    #[serde(skip_serializing_if = "Option::is_none")]
168    #[builder(default)]
169    pub params: Option<Vec<TopLevelParameter>>,
170    /// An object defining properties of geographic projection, which will be applied to `shape`
171    /// path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other
172    /// marks.
173    ///
174    /// An object defining properties of the geographic projection shared by underlying layers.
175    #[serde(skip_serializing_if = "Option::is_none")]
176    #[builder(default)]
177    pub projection: Option<Box<Projection>>,
178    /// Scale, axis, and legend resolutions for view composition specifications.
179    #[serde(skip_serializing_if = "Option::is_none")]
180    #[builder(default)]
181    pub resolve: Option<Box<Resolve>>,
182    /// The spacing in pixels between sub-views of the composition operator. An object of the
183    /// form `{"row": number, "column": number}` can be used to set different spacing values for
184    /// rows and columns.
185    ///
186    /// __Default value__: Depends on `"spacing"` property of [the view composition
187    /// configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by
188    /// default)
189    ///
190    /// The spacing in pixels between sub-views of the concat operator.
191    ///
192    /// __Default value__: `10`
193    #[serde(skip_serializing_if = "Option::is_none")]
194    #[builder(default)]
195    pub spacing: Option<Box<Spacing>>,
196    /// Title for the plot.
197    #[serde(skip_serializing_if = "Option::is_none")]
198    #[builder(default)]
199    pub title: Option<TitleUnion>,
200    /// An array of data transformations such as filter and new field calculation.
201    #[serde(skip_serializing_if = "Option::is_none")]
202    #[builder(default)]
203    pub transform: Option<Vec<Transform>>,
204    /// Optional metadata that will be passed to Vega. This object is completely ignored by Vega
205    /// and Vega-Lite and can be used for custom metadata.
206    #[serde(skip_serializing_if = "Option::is_none")]
207    #[builder(default)]
208    pub usermeta: Option<HashMap<String, Option<serde_json::Value>>>,
209    /// An object defining the view background's fill and stroke.
210    ///
211    /// __Default value:__ none (transparent)
212    #[serde(skip_serializing_if = "Option::is_none")]
213    #[builder(default)]
214    pub view: Option<Box<ViewBackground>>,
215    /// The width of a visualization.
216    ///
217    /// - For a plot with a continuous x-field, width should be a number.
218    /// - For a plot with either a discrete x-field or no x-field, width can be either a number
219    /// indicating a fixed width or an object in the form of `{step: number}` defining the width
220    /// per discrete step. (No x-field is equivalent to having one discrete step.)
221    /// - To enable responsive sizing on width, it should be set to `"container"`.
222    ///
223    /// __Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous
224    /// x-field and `config.view.discreteWidth` otherwise.
225    ///
226    /// __Note:__ For plots with [`row` and `column`
227    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
228    /// width of a single view and the `"container"` option cannot be used.
229    ///
230    /// __See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.
231    #[serde(skip_serializing_if = "Option::is_none")]
232    #[builder(default)]
233    pub width: Option<SpecHeight>,
234    /// The number of columns to include in the view composition layout.
235    ///
236    /// __Default value__: `undefined` -- An infinite number of columns (a single row) will be
237    /// assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel
238    /// (for `facet` and `repeat`).
239    ///
240    /// __Note__:
241    ///
242    /// 1) This property is only for:
243    /// - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)
244    /// - the `facet` and `repeat` operator with one field/repetition definition (without
245    /// row/column nesting)
246    ///
247    /// 2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using
248    /// the `row` channel (for `facet` and `repeat`).
249    #[serde(skip_serializing_if = "Option::is_none")]
250    #[builder(default)]
251    pub columns: Option<f64>,
252    /// Definition for how to facet the data. One of: 1) [a field definition for faceting the
253    /// plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An
254    /// object that maps `row` and `column` channels to their field
255    /// definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)
256    #[serde(skip_serializing_if = "Option::is_none")]
257    #[builder(default)]
258    pub facet: Option<Box<Facet>>,
259    /// A specification of the view that gets faceted.
260    ///
261    /// A specification of the view that gets repeated.
262    #[serde(skip_serializing_if = "Option::is_none")]
263    #[builder(default)]
264    pub spec: Option<Box<VegaliteSpec>>,
265    /// Layer or single view specifications to be layered.
266    ///
267    /// __Note__: Specifications inside `layer` cannot use `row` and `column` channels as
268    /// layering facet specifications is not allowed. Instead, use the [facet
269    /// operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a
270    /// facet.
271    #[serde(skip_serializing_if = "Option::is_none")]
272    #[builder(default)]
273    pub layer: Option<Vec<LayerSpec>>,
274    /// Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If
275    /// `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The
276    /// repeated views are laid out in a wrapped row. You can set the number of columns to
277    /// control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed
278    /// fields to be repeated along the particular orientations. The objects `{"repeat": "row"}`
279    /// and `{"repeat": "column"}` can be used to refer to the repeated field respectively.
280    #[serde(skip_serializing_if = "Option::is_none")]
281    #[builder(default)]
282    pub repeat: Option<Box<RepeatUnion>>,
283    /// A list of views to be concatenated.
284    #[serde(skip_serializing_if = "Option::is_none")]
285    #[builder(default)]
286    pub concat: Option<Vec<Spec>>,
287    /// A list of views to be concatenated and put into a column.
288    #[serde(skip_serializing_if = "Option::is_none")]
289    #[builder(default)]
290    pub vconcat: Option<Vec<Spec>>,
291    /// A list of views to be concatenated and put into a row.
292    #[serde(skip_serializing_if = "Option::is_none")]
293    #[builder(default)]
294    pub hconcat: Option<Vec<Spec>>,
295}
296
297/// The alignment to apply to grid rows and columns. The supported string values are `"all"`,
298/// `"each"`, and `"none"`.
299///
300/// - For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed
301/// one after the other.
302/// - For `"each"`, subviews will be aligned into a clean grid structure, but each row or
303/// column may be of variable size.
304/// - For `"all"`, subviews will be aligned and each row or column will be sized identically
305/// based on the maximum observed size. String values for this property will be applied to
306/// both grid rows and columns.
307///
308/// Alternatively, an object value of the form `{"row": string, "column": string}` can be
309/// used to supply different alignments for rows and columns.
310///
311/// __Default value:__ `"all"`.
312#[derive(Debug, Clone, Serialize, Deserialize)]
313#[serde(untagged)]
314#[derive(From)]
315pub enum VegaliteAlign {
316    Enum(LayoutAlign),
317    RowColLayoutAlign(RowColLayoutAlign),
318}
319
320#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
321#[builder(setter(into, strip_option))]
322pub struct RowColLayoutAlign {
323    #[serde(skip_serializing_if = "Option::is_none")]
324    #[builder(default)]
325    pub column: Option<LayoutAlign>,
326    #[serde(skip_serializing_if = "Option::is_none")]
327    #[builder(default)]
328    pub row: Option<LayoutAlign>,
329}
330
331/// The alignment to apply to symbol legends rows and columns. The supported string values
332/// are `"all"`, `"each"` (the default), and `none`. For more information, see the [grid
333/// layout documentation](https://vega.github.io/vega/docs/layout).
334///
335/// __Default value:__ `"each"`.
336///
337/// The alignment to apply to row/column facet's subplot. The supported string values are
338/// `"all"`, `"each"`, and `"none"`.
339///
340/// - For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed
341/// one after the other.
342/// - For `"each"`, subviews will be aligned into a clean grid structure, but each row or
343/// column may be of variable size.
344/// - For `"all"`, subviews will be aligned and each row or column will be sized identically
345/// based on the maximum observed size. String values for this property will be applied to
346/// both grid rows and columns.
347///
348/// __Default value:__ `"all"`.
349#[derive(Debug, Clone, Serialize, Deserialize)]
350#[serde(rename_all = "snake_case")]
351pub enum LayoutAlign {
352    All,
353    Each,
354    None,
355}
356
357/// How the visualization size should be determined. If a string, should be one of `"pad"`,
358/// `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing
359/// and automatic resizing.
360///
361/// __Default value__: `pad`
362#[derive(Debug, Clone, Serialize, Deserialize)]
363#[serde(untagged)]
364#[derive(From)]
365pub enum Autosize {
366    AutoSizeParams(AutoSizeParams),
367    Enum(AutosizeType),
368}
369
370#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
371#[builder(setter(into, strip_option))]
372pub struct AutoSizeParams {
373    /// Determines how size calculation should be performed, one of `"content"` or `"padding"`.
374    /// The default setting (`"content"`) interprets the width and height settings as the data
375    /// rectangle (plotting) dimensions, to which padding is then added. In contrast, the
376    /// `"padding"` setting includes the padding within the view size calculations, such that the
377    /// width and height settings indicate the **total** intended size of the view.
378    ///
379    /// __Default value__: `"content"`
380    #[serde(skip_serializing_if = "Option::is_none")]
381    #[builder(default)]
382    pub contains: Option<Contains>,
383    /// A boolean flag indicating if autosize layout should be re-calculated on every view
384    /// update.
385    ///
386    /// __Default value__: `false`
387    #[serde(skip_serializing_if = "Option::is_none")]
388    #[builder(default)]
389    pub resize: Option<bool>,
390    /// The sizing format type. One of `"pad"`, `"fit"`, `"fit-x"`, `"fit-y"`,  or `"none"`. See
391    /// the [autosize type](https://vega.github.io/vega-lite/docs/size.html#autosize)
392    /// documentation for descriptions of each.
393    ///
394    /// __Default value__: `"pad"`
395    #[serde(rename = "type")]
396    #[serde(skip_serializing_if = "Option::is_none")]
397    #[builder(default)]
398    pub auto_size_params_type: Option<AutosizeType>,
399}
400
401/// The sizing format type. One of `"pad"`, `"fit"`, `"fit-x"`, `"fit-y"`,  or `"none"`. See
402/// the [autosize type](https://vega.github.io/vega-lite/docs/size.html#autosize)
403/// documentation for descriptions of each.
404///
405/// __Default value__: `"pad"`
406#[derive(Debug, Clone, Serialize, Deserialize)]
407#[serde(rename_all = "kebab-case")]
408pub enum AutosizeType {
409    Fit,
410    #[serde(rename = "fit-x")]
411    FitX,
412    #[serde(rename = "fit-y")]
413    FitY,
414    None,
415    Pad,
416}
417
418/// Determines how size calculation should be performed, one of `"content"` or `"padding"`.
419/// The default setting (`"content"`) interprets the width and height settings as the data
420/// rectangle (plotting) dimensions, to which padding is then added. In contrast, the
421/// `"padding"` setting includes the padding within the view size calculations, such that the
422/// width and height settings indicate the **total** intended size of the view.
423///
424/// __Default value__: `"content"`
425#[derive(Debug, Clone, Serialize, Deserialize)]
426#[serde(rename_all = "snake_case")]
427pub enum Contains {
428    Content,
429    Padding,
430}
431
432/// CSS color property to use as the background of the entire view.
433///
434/// __Default value:__ `"white"`
435///
436/// The color of the header label, can be in hex color code or regular color name.
437///
438/// Color of the header title, can be in hex color code or regular color name.
439#[derive(Debug, Clone, Serialize, Deserialize)]
440#[serde(untagged)]
441#[derive(From)]
442pub enum Color {
443    BackgroundExprRef(BackgroundExprRef),
444    String(String),
445}
446
447/// An expression for an array of raw values that, if non-null, directly overrides the
448/// _domain_ property. This is useful for supporting interactions such as panning or zooming
449/// a scale. The scale may be initially determined using a data-driven domain, then modified
450/// in response to user input by setting the rawDomain value.
451#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
452#[builder(setter(into, strip_option))]
453pub struct BackgroundExprRef {
454    /// Vega expression (which can refer to Vega-Lite parameters).
455    #[serde(skip_serializing_if = "Option::is_none")]
456    #[builder(default)]
457    pub expr: Option<String>,
458}
459
460/// The bounds calculation method to use for determining the extent of a sub-plot. One of
461/// `full` (the default) or `flush`.
462///
463/// - If set to `full`, the entire calculated bounds (including axes, title, and legend) will
464/// be used.
465/// - If set to `flush`, only the specified width and height values for the sub-view will be
466/// used. The `flush` setting can be useful when attempting to place sub-plots without axes
467/// or legends into a uniform grid structure.
468///
469/// __Default value:__ `"full"`
470#[derive(Debug, Clone, Serialize, Deserialize)]
471#[serde(rename_all = "snake_case")]
472pub enum Bounds {
473    Flush,
474    Full,
475}
476
477#[derive(Debug, Clone, Serialize, Deserialize)]
478#[serde(untagged)]
479#[derive(From)]
480pub enum Center {
481    Bool(bool),
482    RowColBoolean(RowColBoolean),
483}
484
485#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
486#[builder(setter(into, strip_option))]
487pub struct RowColBoolean {
488    #[serde(skip_serializing_if = "Option::is_none")]
489    #[builder(default)]
490    pub column: Option<bool>,
491    #[serde(skip_serializing_if = "Option::is_none")]
492    #[builder(default)]
493    pub row: Option<bool>,
494}
495
496/// A specification of the view that gets repeated.
497///
498/// Any specification in Vega-Lite.
499///
500/// Unit spec that can have a composite mark and row or column channels (shorthand for a
501/// facet spec).
502///
503/// A full layered plot specification, which may contains `encoding` and `projection`
504/// properties that will be applied to underlying unit (single-view) specifications.
505///
506/// Base interface for a repeat specification.
507///
508/// Base interface for a facet specification.
509///
510/// Base interface for a generalized concatenation specification.
511///
512/// Base interface for a vertical concatenation specification.
513///
514/// Base interface for a horizontal concatenation specification.
515///
516/// A specification of the view that gets faceted.
517#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
518#[builder(setter(into, strip_option))]
519pub struct SpecSpec {
520    /// The alignment to apply to grid rows and columns. The supported string values are `"all"`,
521    /// `"each"`, and `"none"`.
522    ///
523    /// - For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed
524    /// one after the other.
525    /// - For `"each"`, subviews will be aligned into a clean grid structure, but each row or
526    /// column may be of variable size.
527    /// - For `"all"`, subviews will be aligned and each row or column will be sized identically
528    /// based on the maximum observed size. String values for this property will be applied to
529    /// both grid rows and columns.
530    ///
531    /// Alternatively, an object value of the form `{"row": string, "column": string}` can be
532    /// used to supply different alignments for rows and columns.
533    ///
534    /// __Default value:__ `"all"`.
535    #[serde(skip_serializing_if = "Option::is_none")]
536    #[builder(default)]
537    pub align: Option<Box<VegaliteAlign>>,
538    /// The bounds calculation method to use for determining the extent of a sub-plot. One of
539    /// `full` (the default) or `flush`.
540    ///
541    /// - If set to `full`, the entire calculated bounds (including axes, title, and legend) will
542    /// be used.
543    /// - If set to `flush`, only the specified width and height values for the sub-view will be
544    /// used. The `flush` setting can be useful when attempting to place sub-plots without axes
545    /// or legends into a uniform grid structure.
546    ///
547    /// __Default value:__ `"full"`
548    #[serde(skip_serializing_if = "Option::is_none")]
549    #[builder(default)]
550    pub bounds: Option<Box<Bounds>>,
551    /// Boolean flag indicating if subviews should be centered relative to their respective rows
552    /// or columns.
553    ///
554    /// An object value of the form `{"row": boolean, "column": boolean}` can be used to supply
555    /// different centering values for rows and columns.
556    ///
557    /// __Default value:__ `false`
558    ///
559    /// Boolean flag indicating if subviews should be centered relative to their respective rows
560    /// or columns.
561    ///
562    /// __Default value:__ `false`
563    #[serde(skip_serializing_if = "Option::is_none")]
564    #[builder(default)]
565    pub center: Option<Box<Center>>,
566    /// An object describing the data source. Set to `null` to ignore the parent's data source.
567    /// If no data is set, it is derived from the parent.
568    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
569    #[builder(default)]
570    pub data: RemovableValue<UrlData>,
571    /// Description of this mark for commenting purpose.
572    #[serde(skip_serializing_if = "Option::is_none")]
573    #[builder(default)]
574    pub description: Option<String>,
575    /// A key-value mapping between encoding channels and definition of fields.
576    ///
577    /// A shared key-value mapping between encoding channels and definition of fields in the
578    /// underlying layers.
579    #[serde(skip_serializing_if = "Option::is_none")]
580    #[builder(default)]
581    pub encoding: Option<SpecEncoding>,
582    /// The height of a visualization.
583    ///
584    /// - For a plot with a continuous y-field, height should be a number.
585    /// - For a plot with either a discrete y-field or no y-field, height can be either a number
586    /// indicating a fixed height or an object in the form of `{step: number}` defining the
587    /// height per discrete step. (No y-field is equivalent to having one discrete step.)
588    /// - To enable responsive sizing on height, it should be set to `"container"`.
589    ///
590    /// __Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous
591    /// y-field and `config.view.discreteHeight` otherwise.
592    ///
593    /// __Note:__ For plots with [`row` and `column`
594    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
595    /// height of a single view and the `"container"` option cannot be used.
596    ///
597    /// __See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.
598    #[serde(skip_serializing_if = "Option::is_none")]
599    #[builder(default)]
600    pub height: Option<SpecHeight>,
601    /// A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
602    /// `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark
603    /// definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
604    #[serde(skip_serializing_if = "Option::is_none")]
605    #[builder(default)]
606    pub mark: Option<AnyMark>,
607    /// Name of the visualization for later reference.
608    #[serde(skip_serializing_if = "Option::is_none")]
609    #[builder(default)]
610    pub name: Option<String>,
611    /// An array of parameters that may either be simple variables, or more complex selections
612    /// that map user input to data queries.
613    #[serde(skip_serializing_if = "Option::is_none")]
614    #[builder(default)]
615    pub params: Option<Vec<SelectionParameter>>,
616    /// An object defining properties of geographic projection, which will be applied to `shape`
617    /// path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other
618    /// marks.
619    ///
620    /// An object defining properties of the geographic projection shared by underlying layers.
621    #[serde(skip_serializing_if = "Option::is_none")]
622    #[builder(default)]
623    pub projection: Option<Box<Projection>>,
624    /// Scale, axis, and legend resolutions for view composition specifications.
625    #[serde(skip_serializing_if = "Option::is_none")]
626    #[builder(default)]
627    pub resolve: Option<Box<Resolve>>,
628    /// The spacing in pixels between sub-views of the composition operator. An object of the
629    /// form `{"row": number, "column": number}` can be used to set different spacing values for
630    /// rows and columns.
631    ///
632    /// __Default value__: Depends on `"spacing"` property of [the view composition
633    /// configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by
634    /// default)
635    ///
636    /// The spacing in pixels between sub-views of the concat operator.
637    ///
638    /// __Default value__: `10`
639    #[serde(skip_serializing_if = "Option::is_none")]
640    #[builder(default)]
641    pub spacing: Option<Box<Spacing>>,
642    /// Title for the plot.
643    #[serde(skip_serializing_if = "Option::is_none")]
644    #[builder(default)]
645    pub title: Option<TitleUnion>,
646    /// An array of data transformations such as filter and new field calculation.
647    #[serde(skip_serializing_if = "Option::is_none")]
648    #[builder(default)]
649    pub transform: Option<Vec<Transform>>,
650    /// An object defining the view background's fill and stroke.
651    ///
652    /// __Default value:__ none (transparent)
653    #[serde(skip_serializing_if = "Option::is_none")]
654    #[builder(default)]
655    pub view: Option<Box<ViewBackground>>,
656    /// The width of a visualization.
657    ///
658    /// - For a plot with a continuous x-field, width should be a number.
659    /// - For a plot with either a discrete x-field or no x-field, width can be either a number
660    /// indicating a fixed width or an object in the form of `{step: number}` defining the width
661    /// per discrete step. (No x-field is equivalent to having one discrete step.)
662    /// - To enable responsive sizing on width, it should be set to `"container"`.
663    ///
664    /// __Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous
665    /// x-field and `config.view.discreteWidth` otherwise.
666    ///
667    /// __Note:__ For plots with [`row` and `column`
668    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
669    /// width of a single view and the `"container"` option cannot be used.
670    ///
671    /// __See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.
672    #[serde(skip_serializing_if = "Option::is_none")]
673    #[builder(default)]
674    pub width: Option<SpecHeight>,
675    /// Layer or single view specifications to be layered.
676    ///
677    /// __Note__: Specifications inside `layer` cannot use `row` and `column` channels as
678    /// layering facet specifications is not allowed. Instead, use the [facet
679    /// operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a
680    /// facet.
681    #[serde(skip_serializing_if = "Option::is_none")]
682    #[builder(default)]
683    pub layer: Option<Vec<LayerSpec>>,
684    /// The number of columns to include in the view composition layout.
685    ///
686    /// __Default value__: `undefined` -- An infinite number of columns (a single row) will be
687    /// assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel
688    /// (for `facet` and `repeat`).
689    ///
690    /// __Note__:
691    ///
692    /// 1) This property is only for:
693    /// - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)
694    /// - the `facet` and `repeat` operator with one field/repetition definition (without
695    /// row/column nesting)
696    ///
697    /// 2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using
698    /// the `row` channel (for `facet` and `repeat`).
699    #[serde(skip_serializing_if = "Option::is_none")]
700    #[builder(default)]
701    pub columns: Option<f64>,
702    /// Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If
703    /// `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The
704    /// repeated views are laid out in a wrapped row. You can set the number of columns to
705    /// control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed
706    /// fields to be repeated along the particular orientations. The objects `{"repeat": "row"}`
707    /// and `{"repeat": "column"}` can be used to refer to the repeated field respectively.
708    #[serde(skip_serializing_if = "Option::is_none")]
709    #[builder(default)]
710    pub repeat: Option<Box<RepeatUnion>>,
711    /// A specification of the view that gets repeated.
712    ///
713    /// A specification of the view that gets faceted.
714    #[serde(skip_serializing_if = "Option::is_none")]
715    #[builder(default)]
716    pub spec: Option<Box<SpecSpec>>,
717    /// Definition for how to facet the data. One of: 1) [a field definition for faceting the
718    /// plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An
719    /// object that maps `row` and `column` channels to their field
720    /// definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)
721    #[serde(skip_serializing_if = "Option::is_none")]
722    #[builder(default)]
723    pub facet: Option<Box<Facet>>,
724    /// A list of views to be concatenated.
725    #[serde(skip_serializing_if = "Option::is_none")]
726    #[builder(default)]
727    pub concat: Option<Vec<Spec>>,
728    /// A list of views to be concatenated and put into a column.
729    #[serde(skip_serializing_if = "Option::is_none")]
730    #[builder(default)]
731    pub vconcat: Option<Vec<Spec>>,
732    /// A list of views to be concatenated and put into a row.
733    #[serde(skip_serializing_if = "Option::is_none")]
734    #[builder(default)]
735    pub hconcat: Option<Vec<Spec>>,
736}
737
738/// A specification of the view that gets repeated.
739///
740/// Any specification in Vega-Lite.
741///
742/// Unit spec that can have a composite mark and row or column channels (shorthand for a
743/// facet spec).
744///
745/// A full layered plot specification, which may contains `encoding` and `projection`
746/// properties that will be applied to underlying unit (single-view) specifications.
747///
748/// Base interface for a repeat specification.
749///
750/// Base interface for a facet specification.
751///
752/// Base interface for a generalized concatenation specification.
753///
754/// Base interface for a vertical concatenation specification.
755///
756/// Base interface for a horizontal concatenation specification.
757#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
758#[builder(setter(into, strip_option))]
759pub struct Spec {
760    /// The alignment to apply to grid rows and columns. The supported string values are `"all"`,
761    /// `"each"`, and `"none"`.
762    ///
763    /// - For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed
764    /// one after the other.
765    /// - For `"each"`, subviews will be aligned into a clean grid structure, but each row or
766    /// column may be of variable size.
767    /// - For `"all"`, subviews will be aligned and each row or column will be sized identically
768    /// based on the maximum observed size. String values for this property will be applied to
769    /// both grid rows and columns.
770    ///
771    /// Alternatively, an object value of the form `{"row": string, "column": string}` can be
772    /// used to supply different alignments for rows and columns.
773    ///
774    /// __Default value:__ `"all"`.
775    #[serde(skip_serializing_if = "Option::is_none")]
776    #[builder(default)]
777    pub align: Option<Box<VegaliteAlign>>,
778    /// The bounds calculation method to use for determining the extent of a sub-plot. One of
779    /// `full` (the default) or `flush`.
780    ///
781    /// - If set to `full`, the entire calculated bounds (including axes, title, and legend) will
782    /// be used.
783    /// - If set to `flush`, only the specified width and height values for the sub-view will be
784    /// used. The `flush` setting can be useful when attempting to place sub-plots without axes
785    /// or legends into a uniform grid structure.
786    ///
787    /// __Default value:__ `"full"`
788    #[serde(skip_serializing_if = "Option::is_none")]
789    #[builder(default)]
790    pub bounds: Option<Box<Bounds>>,
791    /// Boolean flag indicating if subviews should be centered relative to their respective rows
792    /// or columns.
793    ///
794    /// An object value of the form `{"row": boolean, "column": boolean}` can be used to supply
795    /// different centering values for rows and columns.
796    ///
797    /// __Default value:__ `false`
798    ///
799    /// Boolean flag indicating if subviews should be centered relative to their respective rows
800    /// or columns.
801    ///
802    /// __Default value:__ `false`
803    #[serde(skip_serializing_if = "Option::is_none")]
804    #[builder(default)]
805    pub center: Option<Box<Center>>,
806    /// An object describing the data source. Set to `null` to ignore the parent's data source.
807    /// If no data is set, it is derived from the parent.
808    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
809    #[builder(default)]
810    pub data: RemovableValue<UrlData>,
811    /// Description of this mark for commenting purpose.
812    #[serde(skip_serializing_if = "Option::is_none")]
813    #[builder(default)]
814    pub description: Option<String>,
815    /// A key-value mapping between encoding channels and definition of fields.
816    ///
817    /// A shared key-value mapping between encoding channels and definition of fields in the
818    /// underlying layers.
819    #[serde(skip_serializing_if = "Option::is_none")]
820    #[builder(default)]
821    pub encoding: Option<Box<EdEncoding>>,
822    /// The height of a visualization.
823    ///
824    /// - For a plot with a continuous y-field, height should be a number.
825    /// - For a plot with either a discrete y-field or no y-field, height can be either a number
826    /// indicating a fixed height or an object in the form of `{step: number}` defining the
827    /// height per discrete step. (No y-field is equivalent to having one discrete step.)
828    /// - To enable responsive sizing on height, it should be set to `"container"`.
829    ///
830    /// __Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous
831    /// y-field and `config.view.discreteHeight` otherwise.
832    ///
833    /// __Note:__ For plots with [`row` and `column`
834    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
835    /// height of a single view and the `"container"` option cannot be used.
836    ///
837    /// __See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.
838    #[serde(skip_serializing_if = "Option::is_none")]
839    #[builder(default)]
840    pub height: Option<SpecHeight>,
841    /// A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
842    /// `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark
843    /// definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
844    #[serde(skip_serializing_if = "Option::is_none")]
845    #[builder(default)]
846    pub mark: Option<AnyMark>,
847    /// Name of the visualization for later reference.
848    #[serde(skip_serializing_if = "Option::is_none")]
849    #[builder(default)]
850    pub name: Option<String>,
851    /// An array of parameters that may either be simple variables, or more complex selections
852    /// that map user input to data queries.
853    #[serde(skip_serializing_if = "Option::is_none")]
854    #[builder(default)]
855    pub params: Option<Vec<SelectionParameter>>,
856    /// An object defining properties of geographic projection, which will be applied to `shape`
857    /// path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other
858    /// marks.
859    ///
860    /// An object defining properties of the geographic projection shared by underlying layers.
861    #[serde(skip_serializing_if = "Option::is_none")]
862    #[builder(default)]
863    pub projection: Option<Box<Projection>>,
864    /// Scale, axis, and legend resolutions for view composition specifications.
865    #[serde(skip_serializing_if = "Option::is_none")]
866    #[builder(default)]
867    pub resolve: Option<Box<Resolve>>,
868    /// The spacing in pixels between sub-views of the composition operator. An object of the
869    /// form `{"row": number, "column": number}` can be used to set different spacing values for
870    /// rows and columns.
871    ///
872    /// __Default value__: Depends on `"spacing"` property of [the view composition
873    /// configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by
874    /// default)
875    ///
876    /// The spacing in pixels between sub-views of the concat operator.
877    ///
878    /// __Default value__: `10`
879    #[serde(skip_serializing_if = "Option::is_none")]
880    #[builder(default)]
881    pub spacing: Option<Box<Spacing>>,
882    /// Title for the plot.
883    #[serde(skip_serializing_if = "Option::is_none")]
884    #[builder(default)]
885    pub title: Option<TitleUnion>,
886    /// An array of data transformations such as filter and new field calculation.
887    #[serde(skip_serializing_if = "Option::is_none")]
888    #[builder(default)]
889    pub transform: Option<Vec<Transform>>,
890    /// An object defining the view background's fill and stroke.
891    ///
892    /// __Default value:__ none (transparent)
893    #[serde(skip_serializing_if = "Option::is_none")]
894    #[builder(default)]
895    pub view: Option<Box<ViewBackground>>,
896    /// The width of a visualization.
897    ///
898    /// - For a plot with a continuous x-field, width should be a number.
899    /// - For a plot with either a discrete x-field or no x-field, width can be either a number
900    /// indicating a fixed width or an object in the form of `{step: number}` defining the width
901    /// per discrete step. (No x-field is equivalent to having one discrete step.)
902    /// - To enable responsive sizing on width, it should be set to `"container"`.
903    ///
904    /// __Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous
905    /// x-field and `config.view.discreteWidth` otherwise.
906    ///
907    /// __Note:__ For plots with [`row` and `column`
908    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
909    /// width of a single view and the `"container"` option cannot be used.
910    ///
911    /// __See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.
912    #[serde(skip_serializing_if = "Option::is_none")]
913    #[builder(default)]
914    pub width: Option<SpecHeight>,
915    /// Layer or single view specifications to be layered.
916    ///
917    /// __Note__: Specifications inside `layer` cannot use `row` and `column` channels as
918    /// layering facet specifications is not allowed. Instead, use the [facet
919    /// operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a
920    /// facet.
921    #[serde(skip_serializing_if = "Option::is_none")]
922    #[builder(default)]
923    pub layer: Option<Vec<LayerSpec>>,
924    /// The number of columns to include in the view composition layout.
925    ///
926    /// __Default value__: `undefined` -- An infinite number of columns (a single row) will be
927    /// assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel
928    /// (for `facet` and `repeat`).
929    ///
930    /// __Note__:
931    ///
932    /// 1) This property is only for:
933    /// - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)
934    /// - the `facet` and `repeat` operator with one field/repetition definition (without
935    /// row/column nesting)
936    ///
937    /// 2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using
938    /// the `row` channel (for `facet` and `repeat`).
939    #[serde(skip_serializing_if = "Option::is_none")]
940    #[builder(default)]
941    pub columns: Option<f64>,
942    /// Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If
943    /// `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The
944    /// repeated views are laid out in a wrapped row. You can set the number of columns to
945    /// control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed
946    /// fields to be repeated along the particular orientations. The objects `{"repeat": "row"}`
947    /// and `{"repeat": "column"}` can be used to refer to the repeated field respectively.
948    #[serde(skip_serializing_if = "Option::is_none")]
949    #[builder(default)]
950    pub repeat: Option<Box<RepeatUnion>>,
951    /// A specification of the view that gets repeated.
952    ///
953    /// A specification of the view that gets faceted.
954    #[serde(skip_serializing_if = "Option::is_none")]
955    #[builder(default)]
956    pub spec: Option<Box<SpecSpec>>,
957    /// Definition for how to facet the data. One of: 1) [a field definition for faceting the
958    /// plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An
959    /// object that maps `row` and `column` channels to their field
960    /// definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)
961    #[serde(skip_serializing_if = "Option::is_none")]
962    #[builder(default)]
963    pub facet: Option<Box<Facet>>,
964    /// A list of views to be concatenated.
965    #[serde(skip_serializing_if = "Option::is_none")]
966    #[builder(default)]
967    pub concat: Option<Vec<Spec>>,
968    /// A list of views to be concatenated and put into a column.
969    #[serde(skip_serializing_if = "Option::is_none")]
970    #[builder(default)]
971    pub vconcat: Option<Vec<Spec>>,
972    /// A list of views to be concatenated and put into a row.
973    #[serde(skip_serializing_if = "Option::is_none")]
974    #[builder(default)]
975    pub hconcat: Option<Vec<Spec>>,
976}
977
978#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
979#[builder(setter(into, strip_option))]
980pub struct UrlData {
981    /// An object that specifies the format for parsing the data.
982    #[serde(skip_serializing_if = "Option::is_none")]
983    #[builder(default)]
984    pub format: Option<DataFormat>,
985    /// Provide a placeholder name and bind data at runtime.
986    ///
987    /// Provide a placeholder name and bind data at runtime.
988    ///
989    /// New data may change the layout but Vega does not always resize the chart. To update the
990    /// layout when the data updates, set
991    /// [autosize](https://vega.github.io/vega-lite/docs/size.html#autosize) or explicitly use
992    /// [view.resize](https://vega.github.io/vega/docs/api/view/#view_resize).
993    #[serde(skip_serializing_if = "Option::is_none")]
994    #[builder(default)]
995    pub name: Option<String>,
996    /// An URL from which to load the data set. Use the `format.type` property to ensure the
997    /// loaded data is correctly parsed.
998    #[serde(skip_serializing_if = "Option::is_none")]
999    #[builder(default)]
1000    pub url: Option<String>,
1001    /// The full data set, included inline. This can be an array of objects or primitive values,
1002    /// an object, or a string. Arrays of primitive values are ingested as objects with a `data`
1003    /// property. Strings are parsed according to the specified format type.
1004    #[serde(skip_serializing_if = "Option::is_none")]
1005    #[builder(default)]
1006    pub values: Option<UrlDataInlineDataset>,
1007    /// Generate a sequence of numbers.
1008    #[serde(skip_serializing_if = "Option::is_none")]
1009    #[builder(default)]
1010    pub sequence: Option<SequenceParams>,
1011    /// Generate sphere GeoJSON data for the full globe.
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    #[builder(default)]
1014    pub sphere: Option<SphereUnion>,
1015    /// Generate graticule GeoJSON data for geographic reference lines.
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    #[builder(default)]
1018    pub graticule: Option<Graticule>,
1019}
1020
1021/// An object that specifies the format for parsing the data.
1022#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
1023#[builder(setter(into, strip_option))]
1024pub struct DataFormat {
1025    /// If set to `null`, disable type inference based on the spec and only use type inference
1026    /// based on the data. Alternatively, a parsing directive object can be provided for explicit
1027    /// data types. Each property of the object corresponds to a field name, and the value to the
1028    /// desired data type (one of `"number"`, `"boolean"`, `"date"`, or null (do not parse the
1029    /// field)). For example, `"parse": {"modified_on": "date"}` parses the `modified_on` field
1030    /// in each input record a Date value.
1031    ///
1032    /// For `"date"`, we parse data based using JavaScript's
1033    /// [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
1034    /// For Specific date formats can be provided (e.g., `{foo: "date:'%m%d%Y'"}`), using the
1035    /// [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date
1036    /// format parsing is supported similarly (e.g., `{foo: "utc:'%m%d%Y'"}`). See more about
1037    /// [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)
1038    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
1039    #[builder(default)]
1040    pub parse: RemovableValue<HashMap<String, Option<String>>>,
1041    /// Type of input data: `"json"`, `"csv"`, `"tsv"`, `"dsv"`.
1042    ///
1043    /// __Default value:__  The default format type is determined by the extension of the file
1044    /// URL. If no extension is detected, `"json"` will be used by default.
1045    #[serde(rename = "type")]
1046    #[serde(skip_serializing_if = "Option::is_none")]
1047    #[builder(default)]
1048    pub data_format_type: Option<DataFormatType>,
1049    /// The delimiter between records. The delimiter must be a single character (i.e., a single
1050    /// 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.
1051    #[serde(skip_serializing_if = "Option::is_none")]
1052    #[builder(default)]
1053    pub delimiter: Option<String>,
1054    /// The JSON property containing the desired data. This parameter can be used when the loaded
1055    /// JSON file may have surrounding structure or meta-data. For example `"property":
1056    /// "values.features"` is equivalent to retrieving `json.values.features` from the loaded
1057    /// JSON object.
1058    #[serde(skip_serializing_if = "Option::is_none")]
1059    #[builder(default)]
1060    pub property: Option<String>,
1061    /// The name of the TopoJSON object set to convert to a GeoJSON feature collection. For
1062    /// example, in a map of the world, there may be an object set named `"countries"`. Using the
1063    /// feature property, we can extract this set and generate a GeoJSON feature object for each
1064    /// country.
1065    #[serde(skip_serializing_if = "Option::is_none")]
1066    #[builder(default)]
1067    pub feature: Option<String>,
1068    /// The name of the TopoJSON object set to convert to mesh. Similar to the `feature` option,
1069    /// `mesh` extracts a named TopoJSON object set.  Unlike the `feature` option, the
1070    /// corresponding geo data is returned as a single, unified mesh instance, not as individual
1071    /// GeoJSON features. Extracting a mesh is useful for more efficiently drawing borders or
1072    /// other geographic elements that you do not need to associate with specific regions such as
1073    /// individual countries, states or counties.
1074    #[serde(skip_serializing_if = "Option::is_none")]
1075    #[builder(default)]
1076    pub mesh: Option<String>,
1077}
1078
1079/// Type of input data: `"json"`, `"csv"`, `"tsv"`, `"dsv"`.
1080///
1081/// __Default value:__  The default format type is determined by the extension of the file
1082/// URL. If no extension is detected, `"json"` will be used by default.
1083#[derive(Debug, Clone, Serialize, Deserialize)]
1084#[serde(rename_all = "snake_case")]
1085pub enum DataFormatType {
1086    Csv,
1087    Dsv,
1088    Json,
1089    Topojson,
1090    Tsv,
1091}
1092
1093/// Generate graticule GeoJSON data for geographic reference lines.
1094#[derive(Debug, Clone, Serialize, Deserialize)]
1095#[serde(untagged)]
1096#[derive(From)]
1097pub enum Graticule {
1098    Bool(bool),
1099    GraticuleParams(GraticuleParams),
1100}
1101
1102#[derive(Debug, Clone, Serialize, Deserialize)]
1103#[serde(rename_all = "camelCase")]
1104#[derive(Default, Builder)]
1105#[builder(setter(into, strip_option))]
1106pub struct GraticuleParams {
1107    /// Sets both the major and minor extents to the same values.
1108    #[serde(skip_serializing_if = "Option::is_none")]
1109    #[builder(default)]
1110    pub extent: Option<Vec<Vec<f64>>>,
1111    /// The major extent of the graticule as a two-element array of coordinates.
1112    #[serde(skip_serializing_if = "Option::is_none")]
1113    #[builder(default)]
1114    pub extent_major: Option<Vec<Vec<f64>>>,
1115    /// The minor extent of the graticule as a two-element array of coordinates.
1116    #[serde(skip_serializing_if = "Option::is_none")]
1117    #[builder(default)]
1118    pub extent_minor: Option<Vec<Vec<f64>>>,
1119    /// The precision of the graticule in degrees.
1120    ///
1121    /// __Default value:__ `2.5`
1122    #[serde(skip_serializing_if = "Option::is_none")]
1123    #[builder(default)]
1124    pub precision: Option<f64>,
1125    /// Sets both the major and minor step angles to the same values.
1126    #[serde(skip_serializing_if = "Option::is_none")]
1127    #[builder(default)]
1128    pub step: Option<Vec<f64>>,
1129    /// The major step angles of the graticule.
1130    ///
1131    ///
1132    /// __Default value:__ `[90, 360]`
1133    #[serde(skip_serializing_if = "Option::is_none")]
1134    #[builder(default)]
1135    pub step_major: Option<Vec<f64>>,
1136    /// The minor step angles of the graticule.
1137    ///
1138    /// __Default value:__ `[10, 10]`
1139    #[serde(skip_serializing_if = "Option::is_none")]
1140    #[builder(default)]
1141    pub step_minor: Option<Vec<f64>>,
1142}
1143
1144/// Generate a sequence of numbers.
1145#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
1146#[builder(setter(into, strip_option))]
1147pub struct SequenceParams {
1148    /// The name of the generated sequence field.
1149    ///
1150    /// __Default value:__ `"data"`
1151    #[serde(rename = "as")]
1152    #[serde(skip_serializing_if = "Option::is_none")]
1153    #[builder(default)]
1154    pub sequence_params_as: Option<String>,
1155    /// The starting value of the sequence (inclusive).
1156    #[serde(skip_serializing_if = "Option::is_none")]
1157    #[builder(default)]
1158    pub start: Option<f64>,
1159    /// The step value between sequence entries.
1160    ///
1161    /// __Default value:__ `1`
1162    #[serde(skip_serializing_if = "Option::is_none")]
1163    #[builder(default)]
1164    pub step: Option<f64>,
1165    /// The ending value of the sequence (exclusive).
1166    #[serde(skip_serializing_if = "Option::is_none")]
1167    #[builder(default)]
1168    pub stop: Option<f64>,
1169}
1170
1171/// Generate sphere GeoJSON data for the full globe.
1172#[derive(Debug, Clone, Serialize, Deserialize)]
1173#[serde(untagged)]
1174#[derive(From)]
1175pub enum SphereUnion {
1176    Bool(bool),
1177    SphereClass(SphereClass),
1178}
1179
1180#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
1181#[builder(setter(into, strip_option))]
1182pub struct SphereClass {}
1183
1184/// The full data set, included inline. This can be an array of objects or primitive values,
1185/// an object, or a string. Arrays of primitive values are ingested as objects with a `data`
1186/// property. Strings are parsed according to the specified format type.
1187#[derive(Debug, Clone, Serialize, Deserialize)]
1188#[serde(untagged)]
1189#[derive(From)]
1190pub enum UrlDataInlineDataset {
1191    AnythingMap(HashMap<String, Option<serde_json::Value>>),
1192    String(String),
1193    UnionArray(Vec<serde_json::value::Value>),
1194}
1195
1196#[derive(Debug, Clone, Serialize, Deserialize)]
1197#[serde(untagged)]
1198#[derive(From)]
1199#[allow(unused)]
1200enum UnusedInlineDataset {
1201    AnythingMap(HashMap<String, Option<serde_json::Value>>),
1202    Bool(bool),
1203    Double(f64),
1204    String(String),
1205}
1206
1207/// A key-value mapping between encoding channels and definition of fields.
1208///
1209/// A shared key-value mapping between encoding channels and definition of fields in the
1210/// underlying layers.
1211#[derive(Debug, Clone, Serialize, Deserialize)]
1212#[serde(rename_all = "camelCase")]
1213#[derive(Default, Builder)]
1214#[builder(setter(into, strip_option))]
1215pub struct SpecEncoding {
1216    /// Rotation angle of point and text marks.
1217    #[serde(skip_serializing_if = "Option::is_none")]
1218    #[builder(default)]
1219    pub angle: Option<AngleClass>,
1220    /// Color of the marks – either fill or stroke color based on  the `filled` property of mark
1221    /// definition. By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
1222    /// `"text"`, `"trail"`, `"circle"`, and `"square"` / stroke color for `"line"` and
1223    /// `"point"`.
1224    ///
1225    /// __Default value:__ If undefined, the default color depends on [mark
1226    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
1227    /// property.
1228    ///
1229    /// _Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please
1230    /// use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher
1231    /// precedence than `color`, thus may override the `color` encoding if conflicting encodings
1232    /// are specified. 2) See the scale documentation for more information about customizing
1233    /// [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).
1234    #[serde(skip_serializing_if = "Option::is_none")]
1235    #[builder(default)]
1236    pub color: Option<ColorClass>,
1237    /// A field definition for the horizontal facet of trellis plots.
1238    #[serde(skip_serializing_if = "Option::is_none")]
1239    #[builder(default)]
1240    pub column: Option<RowColumnEncodingFieldDef>,
1241    /// A text description of this mark for ARIA accessibility (SVG output only). For SVG output
1242    /// the `"aria-label"` attribute will be set to this description.
1243    #[serde(skip_serializing_if = "Option::is_none")]
1244    #[builder(default)]
1245    pub description: Option<DescriptionClass>,
1246    /// Additional levels of detail for grouping data in aggregate views and in line, trail, and
1247    /// area marks without mapping data to a specific visual channel.
1248    #[serde(skip_serializing_if = "Option::is_none")]
1249    #[builder(default)]
1250    pub detail: Option<Detail>,
1251    /// A field definition for the (flexible) facet of trellis plots.
1252    ///
1253    /// If either `row` or `column` is specified, this channel will be ignored.
1254    #[serde(skip_serializing_if = "Option::is_none")]
1255    #[builder(default)]
1256    pub facet: Option<FacetEncodingFieldDef>,
1257    /// Fill color of the marks. __Default value:__ If undefined, the default color depends on
1258    /// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
1259    /// property.
1260    ///
1261    /// _Note:_ The `fill` encoding has higher precedence than `color`, thus may override the
1262    /// `color` encoding if conflicting encodings are specified.
1263    #[serde(skip_serializing_if = "Option::is_none")]
1264    #[builder(default)]
1265    pub fill: Option<FillClass>,
1266    /// Fill opacity of the marks.
1267    ///
1268    /// __Default value:__ If undefined, the default opacity depends on [mark
1269    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
1270    /// property.
1271    #[serde(skip_serializing_if = "Option::is_none")]
1272    #[builder(default)]
1273    pub fill_opacity: Option<FillOpacityClass>,
1274    /// A URL to load upon mouse click.
1275    #[serde(skip_serializing_if = "Option::is_none")]
1276    #[builder(default)]
1277    pub href: Option<HrefClass>,
1278    /// A data field to use as a unique key for data binding. When a visualization’s data is
1279    /// updated, the key value will be used to match data elements to existing mark instances.
1280    /// Use a key channel to enable object constancy for transitions over dynamic data.
1281    #[serde(skip_serializing_if = "Option::is_none")]
1282    #[builder(default)]
1283    pub key: Option<KeyClass>,
1284    /// Latitude position of geographically projected marks.
1285    #[serde(skip_serializing_if = "Option::is_none")]
1286    #[builder(default)]
1287    pub latitude: Option<LatitudeClass>,
1288    /// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
1289    /// `"rule"`.
1290    #[serde(skip_serializing_if = "Option::is_none")]
1291    #[builder(default)]
1292    pub latitude2: Option<Latitude2Class>,
1293    /// Longitude position of geographically projected marks.
1294    #[serde(skip_serializing_if = "Option::is_none")]
1295    #[builder(default)]
1296    pub longitude: Option<LongitudeClass>,
1297    /// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
1298    /// and  `"rule"`.
1299    #[serde(skip_serializing_if = "Option::is_none")]
1300    #[builder(default)]
1301    pub longitude2: Option<Longitude2Class>,
1302    /// Opacity of the marks.
1303    ///
1304    /// __Default value:__ If undefined, the default opacity depends on [mark
1305    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
1306    /// property.
1307    #[serde(skip_serializing_if = "Option::is_none")]
1308    #[builder(default)]
1309    pub opacity: Option<OpacityClass>,
1310    /// Order of the marks.
1311    /// - For stacked marks, this `order` channel encodes [stack
1312    /// order](https://vega.github.io/vega-lite/docs/stack.html#order).
1313    /// - For line and trail marks, this `order` channel encodes order of data points in the
1314    /// lines. This can be useful for creating [a connected
1315    /// scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html).
1316    /// Setting `order` to `{"value": null}` makes the line marks use the original order in the
1317    /// data sources.
1318    /// - Otherwise, this `order` channel encodes layer order of the marks.
1319    ///
1320    /// __Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating
1321    /// additional aggregation grouping.
1322    #[serde(skip_serializing_if = "Option::is_none")]
1323    #[builder(default)]
1324    pub order: Option<Order>,
1325    /// The outer radius in pixels of arc marks.
1326    #[serde(skip_serializing_if = "Option::is_none")]
1327    #[builder(default)]
1328    pub radius: Option<RadiusClass>,
1329    /// The inner radius in pixels of arc marks.
1330    #[serde(skip_serializing_if = "Option::is_none")]
1331    #[builder(default)]
1332    pub radius2: Option<Radius2Class>,
1333    /// A field definition for the vertical facet of trellis plots.
1334    #[serde(skip_serializing_if = "Option::is_none")]
1335    #[builder(default)]
1336    pub row: Option<RowColumnEncodingFieldDef>,
1337    /// Shape of the mark.
1338    ///
1339    /// 1. For `point` marks the supported values include:   - plotting shapes: `"circle"`,
1340    /// `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`,
1341    /// `"triangle-right"`, or `"triangle-left"`.   - the line symbol `"stroke"`   - centered
1342    /// directional shapes `"arrow"`, `"wedge"`, or `"triangle"`   - a custom [SVG path
1343    /// string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct
1344    /// sizing, custom shape paths should be defined within a square bounding box with
1345    /// coordinates ranging from -1 to 1 along both the x and y dimensions.)
1346    ///
1347    /// 2. For `geoshape` marks it should be a field definition of the geojson data
1348    ///
1349    /// __Default value:__ If undefined, the default shape depends on [mark
1350    /// config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape`
1351    /// property. (`"circle"` if unset.)
1352    #[serde(skip_serializing_if = "Option::is_none")]
1353    #[builder(default)]
1354    pub shape: Option<MarkPropDefStringNullTypeForShape>,
1355    /// Size of the mark.
1356    /// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
1357    /// - For `"bar"` and `"tick"` – the bar and tick's size.
1358    /// - For `"text"` – the text's font size.
1359    /// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
1360    /// line with varying size)
1361    #[serde(skip_serializing_if = "Option::is_none")]
1362    #[builder(default)]
1363    pub size: Option<SizeClass>,
1364    /// Stroke color of the marks. __Default value:__ If undefined, the default color depends on
1365    /// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
1366    /// property.
1367    ///
1368    /// _Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the
1369    /// `color` encoding if conflicting encodings are specified.
1370    #[serde(skip_serializing_if = "Option::is_none")]
1371    #[builder(default)]
1372    pub stroke: Option<StrokeClass>,
1373    /// Stroke dash of the marks.
1374    ///
1375    /// __Default value:__ `[1,0]` (No dash).
1376    #[serde(skip_serializing_if = "Option::is_none")]
1377    #[builder(default)]
1378    pub stroke_dash: Option<MarkPropDefNumber>,
1379    /// Stroke opacity of the marks.
1380    ///
1381    /// __Default value:__ If undefined, the default opacity depends on [mark
1382    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
1383    /// property.
1384    #[serde(skip_serializing_if = "Option::is_none")]
1385    #[builder(default)]
1386    pub stroke_opacity: Option<StrokeOpacityClass>,
1387    /// Stroke width of the marks.
1388    ///
1389    /// __Default value:__ If undefined, the default stroke width depends on [mark
1390    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
1391    /// property.
1392    #[serde(skip_serializing_if = "Option::is_none")]
1393    #[builder(default)]
1394    pub stroke_width: Option<StrokeWidthClass>,
1395    /// Text of the `text` mark.
1396    #[serde(skip_serializing_if = "Option::is_none")]
1397    #[builder(default)]
1398    pub text: Option<TextDef>,
1399    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
1400    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
1401    /// clockwise.)
1402    ///
1403    /// - For text marks, polar coordinate angle in radians.
1404    #[serde(skip_serializing_if = "Option::is_none")]
1405    #[builder(default)]
1406    pub theta: Option<ThetaClass>,
1407    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
1408    /// values proceed clockwise.
1409    #[serde(skip_serializing_if = "Option::is_none")]
1410    #[builder(default)]
1411    pub theta2: Option<Theta2Class>,
1412    #[serde(skip_serializing_if = "Option::is_none")]
1413    #[builder(default)]
1414    pub time: Option<TimeFieldDef>,
1415    /// The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the
1416    /// `tooltip` property in the mark
1417    /// definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
1418    ///
1419    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
1420    /// a detailed discussion about tooltip in Vega-Lite.
1421    #[serde(skip_serializing_if = "Option::is_none")]
1422    #[builder(default)]
1423    pub tooltip: Option<EncodingTooltip>,
1424    /// The URL of an image mark.
1425    #[serde(skip_serializing_if = "Option::is_none")]
1426    #[builder(default)]
1427    pub url: Option<UrlClass>,
1428    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
1429    /// `x2` or `width`.
1430    ///
1431    /// The `value` of this channel can be a number or a string `"width"` for the width of the
1432    /// plot.
1433    #[serde(skip_serializing_if = "Option::is_none")]
1434    #[builder(default)]
1435    pub x: Option<XClass>,
1436    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
1437    ///
1438    /// The `value` of this channel can be a number or a string `"width"` for the width of the
1439    /// plot.
1440    #[serde(skip_serializing_if = "Option::is_none")]
1441    #[builder(default)]
1442    pub x2: Option<X2Class>,
1443    /// Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
1444    #[serde(skip_serializing_if = "Option::is_none")]
1445    #[builder(default)]
1446    pub x_error: Option<XErrorClass>,
1447    /// Secondary error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
1448    #[serde(skip_serializing_if = "Option::is_none")]
1449    #[builder(default)]
1450    pub x_error2: Option<XError2Class>,
1451    /// Offset of x-position of the marks
1452    #[serde(skip_serializing_if = "Option::is_none")]
1453    #[builder(default)]
1454    pub x_offset: Option<XOffsetClass>,
1455    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
1456    /// `y2` or `height`.
1457    ///
1458    /// The `value` of this channel can be a number or a string `"height"` for the height of the
1459    /// plot.
1460    #[serde(skip_serializing_if = "Option::is_none")]
1461    #[builder(default)]
1462    pub y: Option<YClass>,
1463    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
1464    ///
1465    /// The `value` of this channel can be a number or a string `"height"` for the height of the
1466    /// plot.
1467    #[serde(skip_serializing_if = "Option::is_none")]
1468    #[builder(default)]
1469    pub y2: Option<Y2Class>,
1470    /// Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
1471    #[serde(skip_serializing_if = "Option::is_none")]
1472    #[builder(default)]
1473    pub y_error: Option<YErrorClass>,
1474    /// Secondary error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
1475    #[serde(skip_serializing_if = "Option::is_none")]
1476    #[builder(default)]
1477    pub y_error2: Option<YError2Class>,
1478    /// Offset of y-position of the marks
1479    #[serde(skip_serializing_if = "Option::is_none")]
1480    #[builder(default)]
1481    pub y_offset: Option<YOffsetClass>,
1482}
1483
1484/// Rotation angle of point and text marks.
1485///
1486/// Fill opacity of the marks.
1487///
1488/// __Default value:__ If undefined, the default opacity depends on [mark
1489/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
1490/// property.
1491///
1492/// Opacity of the marks.
1493///
1494/// __Default value:__ If undefined, the default opacity depends on [mark
1495/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
1496/// property.
1497///
1498/// Size of the mark.
1499/// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
1500/// - For `"bar"` and `"tick"` – the bar and tick's size.
1501/// - For `"text"` – the text's font size.
1502/// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
1503/// line with varying size)
1504///
1505/// Stroke opacity of the marks.
1506///
1507/// __Default value:__ If undefined, the default opacity depends on [mark
1508/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
1509/// property.
1510///
1511/// Stroke width of the marks.
1512///
1513/// __Default value:__ If undefined, the default stroke width depends on [mark
1514/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
1515/// property.
1516///
1517/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
1518#[derive(Debug, Clone, Serialize, Deserialize)]
1519#[serde(rename_all = "camelCase")]
1520#[derive(Default, Builder)]
1521#[builder(setter(into, strip_option))]
1522pub struct AngleClass {
1523    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
1524    /// `"max"`, `"count"`).
1525    ///
1526    /// __Default value:__ `undefined` (None)
1527    ///
1528    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
1529    /// documentation.
1530    #[serde(skip_serializing_if = "Option::is_none")]
1531    #[builder(default)]
1532    pub aggregate: Option<Aggregate>,
1533    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
1534    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
1535    /// middle of the band if set to `0.5`.
1536    #[serde(skip_serializing_if = "Option::is_none")]
1537    #[builder(default)]
1538    pub band_position: Option<f64>,
1539    /// A flag for binning a `quantitative` field, [an object defining binning
1540    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
1541    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
1542    /// (`"binned"`).
1543    ///
1544    /// - If `true`, default [binning
1545    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
1546    /// applied.
1547    ///
1548    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
1549    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
1550    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
1551    /// the axis ticks based on the bin step, you can also set the axis's
1552    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
1553    ///
1554    /// __Default value:__ `false`
1555    ///
1556    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
1557    #[serde(skip_serializing_if = "Option::is_none")]
1558    #[builder(default)]
1559    pub bin: Option<AngleBin>,
1560    /// One or more value definition(s) with [a parameter or a test
1561    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
1562    ///
1563    /// __Note:__ A field definition's `condition` property can only contain [conditional value
1564    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
1565    /// only allows at most one encoded field per encoding channel.
1566    ///
1567    /// A field definition or one or more value definition(s) with a parameter predicate.
1568    #[serde(skip_serializing_if = "Option::is_none")]
1569    #[builder(default)]
1570    pub condition: Option<AngleCondition>,
1571    /// __Required.__ A string defining the name of the field from which to pull a data value or
1572    /// an object defining iterated values from the
1573    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
1574    ///
1575    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
1576    ///
1577    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
1578    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
1579    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
1580    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
1581    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
1582    /// required if `aggregate` is `count`.
1583    #[serde(skip_serializing_if = "Option::is_none")]
1584    #[builder(default)]
1585    pub field: Option<Field>,
1586    /// An object defining properties of the legend. If `null`, the legend for the encoding
1587    /// channel will be removed.
1588    ///
1589    /// __Default value:__ If undefined, default [legend
1590    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
1591    ///
1592    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
1593    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
1594    #[builder(default)]
1595    pub legend: RemovableValue<Legend>,
1596    /// An object defining properties of the channel's scale, which is the function that
1597    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
1598    /// (pixels, colors, sizes) of the encoding channels.
1599    ///
1600    /// If `null`, the scale will be [disabled and the data value will be directly
1601    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
1602    ///
1603    /// __Default value:__ If undefined, default [scale
1604    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
1605    ///
1606    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
1607    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
1608    #[builder(default)]
1609    pub scale: RemovableValue<Scale>,
1610    /// Sort order for the encoded field.
1611    ///
1612    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
1613    /// `"descending"`.
1614    ///
1615    /// For discrete fields, `sort` can be one of the following:
1616    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
1617    /// JavaScript.
1618    /// - [A string indicating an encoding channel name to sort
1619    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
1620    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
1621    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
1622    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
1623    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
1624    /// "descending"}`.
1625    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
1626    /// for sorting by another field.
1627    /// - [An array specifying the field values in preferred
1628    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
1629    /// sort order will obey the values in the array, followed by any unspecified values in their
1630    /// original order. For discrete time field, values in the sort array can be [date-time
1631    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
1632    /// the values can be the month or day names (case insensitive) or their 3-letter initials
1633    /// (e.g., `"Mon"`, `"Tue"`).
1634    /// - `null` indicating no sort.
1635    ///
1636    /// __Default value:__ `"ascending"`
1637    ///
1638    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
1639    ///
1640    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
1641    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
1642    #[builder(default)]
1643    pub sort: RemovableValue<SortUnion>,
1644    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
1645    /// temporal field that gets casted as
1646    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
1647    ///
1648    /// __Default value:__ `undefined` (None)
1649    ///
1650    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
1651    /// documentation.
1652    #[serde(skip_serializing_if = "Option::is_none")]
1653    #[builder(default)]
1654    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
1655    /// A title for the field. If `null`, the title will be removed.
1656    ///
1657    /// __Default value:__  derived from the field's name and transformation function
1658    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
1659    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
1660    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
1661    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
1662    /// name.
1663    ///
1664    /// __Notes__:
1665    ///
1666    /// 1) You can customize the default field title format by providing the
1667    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
1668    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
1669    /// [`fieldTitle` function via the `compile` function's
1670    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
1671    ///
1672    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
1673    /// axis/header/legend title will be used.
1674    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
1675    #[builder(default)]
1676    pub title: RemovableValue<LegendText>,
1677    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
1678    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
1679    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
1680    ///
1681    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
1682    /// is required for a field if: (1) the field is not nominal and the field encoding has no
1683    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
1684    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
1685    /// or `timeUnit`.
1686    ///
1687    /// __Default value:__
1688    ///
1689    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
1690    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
1691    /// following criteria:
1692    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
1693    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
1694    /// `longitude` channel or (3) if the specified scale type is [a quantitative
1695    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
1696    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
1697    /// the specified scale type is a time or utc scale
1698    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
1699    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
1700    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
1701    /// `order`.
1702    ///
1703    /// 2) For a constant value in data domain (`datum`):
1704    /// - `"quantitative"` if the datum is a number
1705    /// - `"nominal"` if the datum is a string
1706    /// - `"temporal"` if the datum is [a date time
1707    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
1708    ///
1709    /// __Note:__
1710    /// - Data `type` describes the semantics of the data rather than the primitive data types
1711    /// (number, string, etc.). The same primitive data type can have different types of
1712    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
1713    /// data.
1714    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
1715    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
1716    /// `1552199579097`).
1717    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
1718    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
1719    /// (for using an ordinal bin
1720    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
1721    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
1722    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
1723    /// [`"ordinal"` (for using an ordinal
1724    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
1725    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
1726    /// the `type` property refers to the post-aggregation data type. For example, we can
1727    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
1728    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
1729    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
1730    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
1731    ///
1732    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
1733    #[serde(rename = "type")]
1734    #[serde(skip_serializing_if = "Option::is_none")]
1735    #[builder(default)]
1736    pub mark_prop_def_number_type: Option<Type>,
1737    /// A constant value in data domain.
1738    #[serde(skip_serializing_if = "Option::is_none")]
1739    #[builder(default)]
1740    pub datum: Option<PrimitiveValue>,
1741    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
1742    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
1743    /// between `0` to `1` for opacity).
1744    #[serde(skip_serializing_if = "Option::is_none")]
1745    #[builder(default)]
1746    pub value: Option<CornerRadiusUnion>,
1747}
1748
1749/// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
1750/// `"max"`, `"count"`).
1751///
1752/// __Default value:__ `undefined` (None)
1753///
1754/// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
1755/// documentation.
1756#[derive(Debug, Clone, Serialize, Deserialize)]
1757#[serde(untagged)]
1758#[derive(From)]
1759pub enum Aggregate {
1760    ArgmDef(ArgmDef),
1761    Enum(NonArgAggregateOp),
1762}
1763
1764#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
1765#[builder(setter(into, strip_option))]
1766pub struct ArgmDef {
1767    #[serde(skip_serializing_if = "Option::is_none")]
1768    #[builder(default)]
1769    pub argmax: Option<String>,
1770    #[serde(skip_serializing_if = "Option::is_none")]
1771    #[builder(default)]
1772    pub argmin: Option<String>,
1773}
1774
1775/// An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to
1776/// perform on the field prior to sorting (e.g., `"count"`, `"mean"` and `"median"`). An
1777/// aggregation is required when there are multiple values of the sort field for each encoded
1778/// data field. The input data objects will be aggregated, grouped by the encoded data
1779/// field.
1780///
1781/// For a full list of operations, please see the documentation for
1782/// [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).
1783///
1784/// __Default value:__ `"sum"` for stacked plots. Otherwise, `"min"`.
1785#[derive(Debug, Clone, Serialize, Deserialize)]
1786#[serde(rename_all = "snake_case")]
1787pub enum NonArgAggregateOp {
1788    Average,
1789    Ci0,
1790    Ci1,
1791    Count,
1792    Distinct,
1793    Exponential,
1794    Exponentialb,
1795    Max,
1796    Mean,
1797    Median,
1798    Min,
1799    Missing,
1800    Product,
1801    Q1,
1802    Q3,
1803    Stderr,
1804    Stdev,
1805    Stdevp,
1806    Sum,
1807    Valid,
1808    Values,
1809    Variance,
1810    Variancep,
1811}
1812
1813/// An object indicating bin properties, or simply `true` for using default bin parameters.
1814#[derive(Debug, Clone, Serialize, Deserialize)]
1815#[serde(untagged)]
1816#[derive(From)]
1817pub enum AngleBin {
1818    BinParams(BinParams),
1819    Bool(bool),
1820}
1821
1822/// Binning properties or boolean flag for determining whether to bin data or not.
1823#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
1824#[builder(setter(into, strip_option))]
1825pub struct BinParams {
1826    /// A value in the binned domain at which to anchor the bins, shifting the bin boundaries if
1827    /// necessary to ensure that a boundary aligns with the anchor value.
1828    ///
1829    /// __Default value:__ the minimum bin extent value
1830    #[serde(skip_serializing_if = "Option::is_none")]
1831    #[builder(default)]
1832    pub anchor: Option<f64>,
1833    /// The number base to use for automatic bin determination (default is base 10).
1834    ///
1835    /// __Default value:__ `10`
1836    #[serde(skip_serializing_if = "Option::is_none")]
1837    #[builder(default)]
1838    pub base: Option<f64>,
1839    /// When set to `true`, Vega-Lite treats the input data as already binned.
1840    #[serde(skip_serializing_if = "Option::is_none")]
1841    #[builder(default)]
1842    pub binned: Option<bool>,
1843    /// Scale factors indicating allowable subdivisions. The default value is [5, 2], which
1844    /// indicates that for base 10 numbers (the default base), the method may consider dividing
1845    /// bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can
1846    /// check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the
1847    /// given constraints.
1848    ///
1849    /// __Default value:__ `[5, 2]`
1850    #[serde(skip_serializing_if = "Option::is_none")]
1851    #[builder(default)]
1852    pub divide: Option<Vec<f64>>,
1853    /// A two-element (`[min, max]`) array indicating the range of desired bin values.
1854    #[serde(skip_serializing_if = "Option::is_none")]
1855    #[builder(default)]
1856    pub extent: Option<BinExtent>,
1857    /// Maximum number of bins.
1858    ///
1859    /// __Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels
1860    #[serde(skip_serializing_if = "Option::is_none")]
1861    #[builder(default)]
1862    pub maxbins: Option<f64>,
1863    /// A minimum allowable step size (particularly useful for integer values).
1864    #[serde(skip_serializing_if = "Option::is_none")]
1865    #[builder(default)]
1866    pub minstep: Option<f64>,
1867    /// If true, attempts to make the bin boundaries use human-friendly boundaries, such as
1868    /// multiples of ten.
1869    ///
1870    /// __Default value:__ `true`
1871    #[serde(skip_serializing_if = "Option::is_none")]
1872    #[builder(default)]
1873    pub nice: Option<bool>,
1874    /// An exact step size to use between bins.
1875    ///
1876    /// __Note:__ If provided, options such as maxbins will be ignored.
1877    #[serde(skip_serializing_if = "Option::is_none")]
1878    #[builder(default)]
1879    pub step: Option<f64>,
1880    /// An array of allowable step sizes to choose from.
1881    #[serde(skip_serializing_if = "Option::is_none")]
1882    #[builder(default)]
1883    pub steps: Option<Vec<f64>>,
1884}
1885
1886/// A two-element (`[min, max]`) array indicating the range of desired bin values.
1887#[derive(Debug, Clone, Serialize, Deserialize)]
1888#[serde(untagged)]
1889#[derive(From)]
1890pub enum BinExtent {
1891    BinExtentClass(BinExtentClass),
1892    DoubleArray(Vec<f64>),
1893}
1894
1895#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
1896#[builder(setter(into, strip_option))]
1897pub struct BinExtentClass {
1898    /// If a selection parameter is specified, the field name to extract selected values for when
1899    /// the selection is
1900    /// [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple
1901    /// fields or encodings.
1902    #[serde(skip_serializing_if = "Option::is_none")]
1903    #[builder(default)]
1904    pub field: Option<String>,
1905    /// The name of a parameter.
1906    #[serde(skip_serializing_if = "Option::is_none")]
1907    #[builder(default)]
1908    pub param: Option<String>,
1909    /// If a selection parameter is specified, the encoding channel to extract selected values
1910    /// for when a selection is
1911    /// [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple
1912    /// fields or encodings.
1913    #[serde(skip_serializing_if = "Option::is_none")]
1914    #[builder(default)]
1915    pub encoding: Option<SingleDefUnitChannel>,
1916}
1917
1918/// If a selection parameter is specified, the encoding channel to extract selected values
1919/// for when a selection is
1920/// [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple
1921/// fields or encodings.
1922#[derive(Debug, Clone, Serialize, Deserialize)]
1923#[serde(rename_all = "camelCase")]
1924pub enum SingleDefUnitChannel {
1925    Angle,
1926    Color,
1927    Description,
1928    Fill,
1929    #[serde(rename = "fillOpacity")]
1930    FillOpacity,
1931    Href,
1932    Key,
1933    Latitude,
1934    Latitude2,
1935    Longitude,
1936    Longitude2,
1937    Opacity,
1938    Radius,
1939    Radius2,
1940    Shape,
1941    Size,
1942    Stroke,
1943    #[serde(rename = "strokeDash")]
1944    StrokeDash,
1945    #[serde(rename = "strokeOpacity")]
1946    StrokeOpacity,
1947    #[serde(rename = "strokeWidth")]
1948    StrokeWidth,
1949    Text,
1950    Theta,
1951    Theta2,
1952    Time,
1953    Url,
1954    X,
1955    X2,
1956    #[serde(rename = "xOffset")]
1957    XOffset,
1958    Y,
1959    Y2,
1960    #[serde(rename = "yOffset")]
1961    YOffset,
1962}
1963
1964#[derive(Debug, Clone, Serialize, Deserialize)]
1965#[serde(untagged)]
1966#[derive(From)]
1967pub enum AngleCondition {
1968    ConditionalPredicateValueDefNumberExprRefClass(ConditionalPredicateValueDefNumberExprRefClass),
1969    ConditionalValueDefNumberExprRefArray(Vec<ConditionalValueDefNumberExprRef>),
1970}
1971
1972#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
1973#[builder(setter(into, strip_option))]
1974pub struct ConditionalValueDefNumberExprRef {
1975    /// Predicate for triggering the condition
1976    #[serde(skip_serializing_if = "Option::is_none")]
1977    #[builder(default)]
1978    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
1979    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
1980    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
1981    /// between `0` to `1` for opacity).
1982    #[serde(skip_serializing_if = "Option::is_none")]
1983    #[builder(default)]
1984    pub value: Option<ConditionalValueDefNumberExprRefValue>,
1985    /// For selection parameters, the predicate of empty selections returns true by default.
1986    /// Override this behavior, by setting this property `empty: false`.
1987    #[serde(skip_serializing_if = "Option::is_none")]
1988    #[builder(default)]
1989    pub empty: Option<bool>,
1990    /// Filter using a parameter name.
1991    #[serde(skip_serializing_if = "Option::is_none")]
1992    #[builder(default)]
1993    pub param: Option<String>,
1994}
1995
1996/// Predicate for triggering the condition
1997///
1998/// The `filter` property must be a predication definition, which can take one of the
1999/// following forms:
2000///
2001/// 1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string,
2002/// where `datum` can be used to refer to the current data object. For example, `{filter:
2003/// "datum.b2 > 60"}` would make the output data includes only items that have values in the
2004/// field `b2` over 60.
2005///
2006/// 2) one of the [field
2007/// predicates](https://vega.github.io/vega-lite/docs/predicate.html#field-predicate):
2008/// [`equal`](https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate),
2009/// [`lt`](https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate),
2010/// [`lte`](https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate),
2011/// [`gt`](https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate),
2012/// [`gte`](https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate),
2013/// [`range`](https://vega.github.io/vega-lite/docs/predicate.html#range-predicate),
2014/// [`oneOf`](https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate), or
2015/// [`valid`](https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate),
2016///
2017/// 3) a [selection
2018/// predicate](https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate),
2019/// which define the names of a selection that the data point should belong to (or a logical
2020/// composition of selections).
2021///
2022/// 4) a [logical
2023/// composition](https://vega.github.io/vega-lite/docs/predicate.html#composition) of (1),
2024/// (2), or (3).
2025#[derive(Debug, Clone, Serialize, Deserialize)]
2026#[serde(untagged)]
2027#[derive(From)]
2028pub enum PredicateCompositionElement {
2029    Predicate(Box<Predicate>),
2030    String(String),
2031}
2032
2033#[derive(Debug, Clone, Serialize, Deserialize)]
2034#[serde(rename_all = "camelCase")]
2035#[derive(Default, Builder)]
2036#[builder(setter(into, strip_option))]
2037pub struct Predicate {
2038    #[serde(skip_serializing_if = "Option::is_none")]
2039    #[builder(default)]
2040    pub not: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
2041    #[serde(skip_serializing_if = "Option::is_none")]
2042    #[builder(default)]
2043    pub and: Option<Vec<PredicateCompositionElement>>,
2044    #[serde(skip_serializing_if = "Option::is_none")]
2045    #[builder(default)]
2046    pub or: Option<Vec<PredicateCompositionElement>>,
2047    /// The value that the field should be equal to.
2048    #[serde(skip_serializing_if = "Option::is_none")]
2049    #[builder(default)]
2050    pub equal: Option<Equal>,
2051    /// Field to be tested.
2052    #[serde(skip_serializing_if = "Option::is_none")]
2053    #[builder(default)]
2054    pub field: Option<String>,
2055    /// Time unit for the field to be tested.
2056    #[serde(skip_serializing_if = "Option::is_none")]
2057    #[builder(default)]
2058    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
2059    /// An array of inclusive minimum and maximum values for a field value of a data item to be
2060    /// included in the filtered data.
2061    #[serde(skip_serializing_if = "Option::is_none")]
2062    #[builder(default)]
2063    pub range: Option<LogicalNotPredicateRange>,
2064    /// A set of values that the `field`'s value should be a member of, for a data item included
2065    /// in the filtered data.
2066    #[serde(skip_serializing_if = "Option::is_none")]
2067    #[builder(default)]
2068    pub one_of: Option<Vec<UnionWith>>,
2069    /// The value that the field should be less than.
2070    #[serde(skip_serializing_if = "Option::is_none")]
2071    #[builder(default)]
2072    pub lt: Option<Lt>,
2073    /// The value that the field should be greater than.
2074    #[serde(skip_serializing_if = "Option::is_none")]
2075    #[builder(default)]
2076    pub gt: Option<Lt>,
2077    /// The value that the field should be less than or equals to.
2078    #[serde(skip_serializing_if = "Option::is_none")]
2079    #[builder(default)]
2080    pub lte: Option<Lt>,
2081    /// The value that the field should be greater than or equals to.
2082    #[serde(skip_serializing_if = "Option::is_none")]
2083    #[builder(default)]
2084    pub gte: Option<Lt>,
2085    /// If set to true the field's value has to be valid, meaning both not `null` and not
2086    /// [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN).
2087    #[serde(skip_serializing_if = "Option::is_none")]
2088    #[builder(default)]
2089    pub valid: Option<bool>,
2090    /// For selection parameters, the predicate of empty selections returns true by default.
2091    /// Override this behavior, by setting this property `empty: false`.
2092    #[serde(skip_serializing_if = "Option::is_none")]
2093    #[builder(default)]
2094    pub empty: Option<bool>,
2095    /// Filter using a parameter name.
2096    #[serde(skip_serializing_if = "Option::is_none")]
2097    #[builder(default)]
2098    pub param: Option<String>,
2099}
2100
2101/// Predicate for triggering the condition
2102///
2103/// The `filter` property must be a predication definition, which can take one of the
2104/// following forms:
2105///
2106/// 1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string,
2107/// where `datum` can be used to refer to the current data object. For example, `{filter:
2108/// "datum.b2 > 60"}` would make the output data includes only items that have values in the
2109/// field `b2` over 60.
2110///
2111/// 2) one of the [field
2112/// predicates](https://vega.github.io/vega-lite/docs/predicate.html#field-predicate):
2113/// [`equal`](https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate),
2114/// [`lt`](https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate),
2115/// [`lte`](https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate),
2116/// [`gt`](https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate),
2117/// [`gte`](https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate),
2118/// [`range`](https://vega.github.io/vega-lite/docs/predicate.html#range-predicate),
2119/// [`oneOf`](https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate), or
2120/// [`valid`](https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate),
2121///
2122/// 3) a [selection
2123/// predicate](https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate),
2124/// which define the names of a selection that the data point should belong to (or a logical
2125/// composition of selections).
2126///
2127/// 4) a [logical
2128/// composition](https://vega.github.io/vega-lite/docs/predicate.html#composition) of (1),
2129/// (2), or (3).
2130#[derive(Debug, Clone, Serialize, Deserialize)]
2131#[serde(untagged)]
2132#[derive(From)]
2133pub enum ConditionalValueDefNumberExprRefPredicateComposition {
2134    Predicate(Box<Predicate>),
2135    String(String),
2136}
2137
2138/// The value that the field should be equal to.
2139#[derive(Debug, Clone, Serialize, Deserialize)]
2140#[serde(untagged)]
2141#[derive(From)]
2142pub enum Equal {
2143    Bool(bool),
2144    Double(f64),
2145    EqualDateTime(EqualDateTime),
2146    String(String),
2147}
2148
2149/// Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
2150/// month has higher precedence. `day` cannot be combined with other date. We accept string
2151/// for month and day names.
2152///
2153/// An expression for an array of raw values that, if non-null, directly overrides the
2154/// _domain_ property. This is useful for supporting interactions such as panning or zooming
2155/// a scale. The scale may be initially determined using a data-driven domain, then modified
2156/// in response to user input by setting the rawDomain value.
2157#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
2158#[builder(setter(into, strip_option))]
2159pub struct EqualDateTime {
2160    /// Integer value representing the date (day of the month) from 1-31.
2161    #[serde(skip_serializing_if = "Option::is_none")]
2162    #[builder(default)]
2163    pub date: Option<f64>,
2164    /// Value representing the day of a week. This can be one of: (1) integer value -- `1`
2165    /// represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
2166    /// case-insensitive, 3-character short day name (e.g., `"Mon"`).
2167    ///
2168    /// **Warning:** A DateTime definition object with `day`** should not be combined with
2169    /// `year`, `quarter`, `month`, or `date`.
2170    #[serde(skip_serializing_if = "Option::is_none")]
2171    #[builder(default)]
2172    pub day: Option<DayUnion>,
2173    /// Integer value representing the hour of a day from 0-23.
2174    #[serde(skip_serializing_if = "Option::is_none")]
2175    #[builder(default)]
2176    pub hours: Option<f64>,
2177    /// Integer value representing the millisecond segment of time.
2178    #[serde(skip_serializing_if = "Option::is_none")]
2179    #[builder(default)]
2180    pub milliseconds: Option<f64>,
2181    /// Integer value representing the minute segment of time from 0-59.
2182    #[serde(skip_serializing_if = "Option::is_none")]
2183    #[builder(default)]
2184    pub minutes: Option<f64>,
2185    /// One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
2186    /// (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
2187    /// short month name (e.g., `"Jan"`).
2188    #[serde(skip_serializing_if = "Option::is_none")]
2189    #[builder(default)]
2190    pub month: Option<Month>,
2191    /// Integer value representing the quarter of the year (from 1-4).
2192    #[serde(skip_serializing_if = "Option::is_none")]
2193    #[builder(default)]
2194    pub quarter: Option<f64>,
2195    /// Integer value representing the second segment (0-59) of a time value
2196    #[serde(skip_serializing_if = "Option::is_none")]
2197    #[builder(default)]
2198    pub seconds: Option<f64>,
2199    /// A boolean flag indicating if date time is in utc time. If false, the date time is in
2200    /// local time
2201    #[serde(skip_serializing_if = "Option::is_none")]
2202    #[builder(default)]
2203    pub utc: Option<bool>,
2204    /// Integer value representing the year.
2205    #[serde(skip_serializing_if = "Option::is_none")]
2206    #[builder(default)]
2207    pub year: Option<f64>,
2208    /// Vega expression (which can refer to Vega-Lite parameters).
2209    #[serde(skip_serializing_if = "Option::is_none")]
2210    #[builder(default)]
2211    pub expr: Option<String>,
2212}
2213
2214/// Value representing the day of a week. This can be one of: (1) integer value -- `1`
2215/// represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
2216/// case-insensitive, 3-character short day name (e.g., `"Mon"`).
2217///
2218/// **Warning:** A DateTime definition object with `day`** should not be combined with
2219/// `year`, `quarter`, `month`, or `date`.
2220#[derive(Debug, Clone, Serialize, Deserialize)]
2221#[serde(untagged)]
2222#[derive(From)]
2223pub enum DayUnion {
2224    Double(f64),
2225    String(String),
2226}
2227
2228/// One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
2229/// (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
2230/// short month name (e.g., `"Jan"`).
2231#[derive(Debug, Clone, Serialize, Deserialize)]
2232#[serde(untagged)]
2233#[derive(From)]
2234pub enum Month {
2235    Double(f64),
2236    String(String),
2237}
2238
2239#[derive(Debug, Clone, Serialize, Deserialize)]
2240#[serde(untagged)]
2241#[derive(From)]
2242pub enum Lt {
2243    Double(f64),
2244    GtDateTime(GtDateTime),
2245    String(String),
2246}
2247
2248/// Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
2249/// month has higher precedence. `day` cannot be combined with other date. We accept string
2250/// for month and day names.
2251///
2252/// An expression for an array of raw values that, if non-null, directly overrides the
2253/// _domain_ property. This is useful for supporting interactions such as panning or zooming
2254/// a scale. The scale may be initially determined using a data-driven domain, then modified
2255/// in response to user input by setting the rawDomain value.
2256#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
2257#[builder(setter(into, strip_option))]
2258pub struct GtDateTime {
2259    /// Integer value representing the date (day of the month) from 1-31.
2260    #[serde(skip_serializing_if = "Option::is_none")]
2261    #[builder(default)]
2262    pub date: Option<f64>,
2263    /// Value representing the day of a week. This can be one of: (1) integer value -- `1`
2264    /// represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
2265    /// case-insensitive, 3-character short day name (e.g., `"Mon"`).
2266    ///
2267    /// **Warning:** A DateTime definition object with `day`** should not be combined with
2268    /// `year`, `quarter`, `month`, or `date`.
2269    #[serde(skip_serializing_if = "Option::is_none")]
2270    #[builder(default)]
2271    pub day: Option<DayUnion>,
2272    /// Integer value representing the hour of a day from 0-23.
2273    #[serde(skip_serializing_if = "Option::is_none")]
2274    #[builder(default)]
2275    pub hours: Option<f64>,
2276    /// Integer value representing the millisecond segment of time.
2277    #[serde(skip_serializing_if = "Option::is_none")]
2278    #[builder(default)]
2279    pub milliseconds: Option<f64>,
2280    /// Integer value representing the minute segment of time from 0-59.
2281    #[serde(skip_serializing_if = "Option::is_none")]
2282    #[builder(default)]
2283    pub minutes: Option<f64>,
2284    /// One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
2285    /// (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
2286    /// short month name (e.g., `"Jan"`).
2287    #[serde(skip_serializing_if = "Option::is_none")]
2288    #[builder(default)]
2289    pub month: Option<Month>,
2290    /// Integer value representing the quarter of the year (from 1-4).
2291    #[serde(skip_serializing_if = "Option::is_none")]
2292    #[builder(default)]
2293    pub quarter: Option<f64>,
2294    /// Integer value representing the second segment (0-59) of a time value
2295    #[serde(skip_serializing_if = "Option::is_none")]
2296    #[builder(default)]
2297    pub seconds: Option<f64>,
2298    /// A boolean flag indicating if date time is in utc time. If false, the date time is in
2299    /// local time
2300    #[serde(skip_serializing_if = "Option::is_none")]
2301    #[builder(default)]
2302    pub utc: Option<bool>,
2303    /// Integer value representing the year.
2304    #[serde(skip_serializing_if = "Option::is_none")]
2305    #[builder(default)]
2306    pub year: Option<f64>,
2307    /// Vega expression (which can refer to Vega-Lite parameters).
2308    #[serde(skip_serializing_if = "Option::is_none")]
2309    #[builder(default)]
2310    pub expr: Option<String>,
2311}
2312
2313#[derive(Debug, Clone, Serialize, Deserialize)]
2314#[serde(untagged)]
2315#[derive(From)]
2316pub enum UnionWith {
2317    Bool(bool),
2318    DateTime(DateTime),
2319    Double(f64),
2320    String(String),
2321}
2322
2323/// Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
2324/// month has higher precedence. `day` cannot be combined with other date. We accept string
2325/// for month and day names.
2326#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
2327#[builder(setter(into, strip_option))]
2328pub struct DateTime {
2329    /// Integer value representing the date (day of the month) from 1-31.
2330    #[serde(skip_serializing_if = "Option::is_none")]
2331    #[builder(default)]
2332    pub date: Option<f64>,
2333    /// Value representing the day of a week. This can be one of: (1) integer value -- `1`
2334    /// represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
2335    /// case-insensitive, 3-character short day name (e.g., `"Mon"`).
2336    ///
2337    /// **Warning:** A DateTime definition object with `day`** should not be combined with
2338    /// `year`, `quarter`, `month`, or `date`.
2339    #[serde(skip_serializing_if = "Option::is_none")]
2340    #[builder(default)]
2341    pub day: Option<DayUnion>,
2342    /// Integer value representing the hour of a day from 0-23.
2343    #[serde(skip_serializing_if = "Option::is_none")]
2344    #[builder(default)]
2345    pub hours: Option<f64>,
2346    /// Integer value representing the millisecond segment of time.
2347    #[serde(skip_serializing_if = "Option::is_none")]
2348    #[builder(default)]
2349    pub milliseconds: Option<f64>,
2350    /// Integer value representing the minute segment of time from 0-59.
2351    #[serde(skip_serializing_if = "Option::is_none")]
2352    #[builder(default)]
2353    pub minutes: Option<f64>,
2354    /// One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
2355    /// (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
2356    /// short month name (e.g., `"Jan"`).
2357    #[serde(skip_serializing_if = "Option::is_none")]
2358    #[builder(default)]
2359    pub month: Option<Month>,
2360    /// Integer value representing the quarter of the year (from 1-4).
2361    #[serde(skip_serializing_if = "Option::is_none")]
2362    #[builder(default)]
2363    pub quarter: Option<f64>,
2364    /// Integer value representing the second segment (0-59) of a time value
2365    #[serde(skip_serializing_if = "Option::is_none")]
2366    #[builder(default)]
2367    pub seconds: Option<f64>,
2368    /// A boolean flag indicating if date time is in utc time. If false, the date time is in
2369    /// local time
2370    #[serde(skip_serializing_if = "Option::is_none")]
2371    #[builder(default)]
2372    pub utc: Option<bool>,
2373    /// Integer value representing the year.
2374    #[serde(skip_serializing_if = "Option::is_none")]
2375    #[builder(default)]
2376    pub year: Option<f64>,
2377}
2378
2379/// An array of inclusive minimum and maximum values for a field value of a data item to be
2380/// included in the filtered data.
2381#[derive(Debug, Clone, Serialize, Deserialize)]
2382#[serde(untagged)]
2383#[derive(From)]
2384pub enum LogicalNotPredicateRange {
2385    BackgroundExprRef(BackgroundExprRef),
2386    UnionArray(Vec<Option<PurpleRange>>),
2387}
2388
2389#[derive(Debug, Clone, Serialize, Deserialize)]
2390#[serde(untagged)]
2391#[derive(From)]
2392pub enum PurpleRange {
2393    Double(f64),
2394    RangeDateTime(RangeDateTime),
2395}
2396
2397/// Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
2398/// month has higher precedence. `day` cannot be combined with other date. We accept string
2399/// for month and day names.
2400///
2401/// An expression for an array of raw values that, if non-null, directly overrides the
2402/// _domain_ property. This is useful for supporting interactions such as panning or zooming
2403/// a scale. The scale may be initially determined using a data-driven domain, then modified
2404/// in response to user input by setting the rawDomain value.
2405#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
2406#[builder(setter(into, strip_option))]
2407pub struct RangeDateTime {
2408    /// Integer value representing the date (day of the month) from 1-31.
2409    #[serde(skip_serializing_if = "Option::is_none")]
2410    #[builder(default)]
2411    pub date: Option<f64>,
2412    /// Value representing the day of a week. This can be one of: (1) integer value -- `1`
2413    /// represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
2414    /// case-insensitive, 3-character short day name (e.g., `"Mon"`).
2415    ///
2416    /// **Warning:** A DateTime definition object with `day`** should not be combined with
2417    /// `year`, `quarter`, `month`, or `date`.
2418    #[serde(skip_serializing_if = "Option::is_none")]
2419    #[builder(default)]
2420    pub day: Option<DayUnion>,
2421    /// Integer value representing the hour of a day from 0-23.
2422    #[serde(skip_serializing_if = "Option::is_none")]
2423    #[builder(default)]
2424    pub hours: Option<f64>,
2425    /// Integer value representing the millisecond segment of time.
2426    #[serde(skip_serializing_if = "Option::is_none")]
2427    #[builder(default)]
2428    pub milliseconds: Option<f64>,
2429    /// Integer value representing the minute segment of time from 0-59.
2430    #[serde(skip_serializing_if = "Option::is_none")]
2431    #[builder(default)]
2432    pub minutes: Option<f64>,
2433    /// One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
2434    /// (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
2435    /// short month name (e.g., `"Jan"`).
2436    #[serde(skip_serializing_if = "Option::is_none")]
2437    #[builder(default)]
2438    pub month: Option<Month>,
2439    /// Integer value representing the quarter of the year (from 1-4).
2440    #[serde(skip_serializing_if = "Option::is_none")]
2441    #[builder(default)]
2442    pub quarter: Option<f64>,
2443    /// Integer value representing the second segment (0-59) of a time value
2444    #[serde(skip_serializing_if = "Option::is_none")]
2445    #[builder(default)]
2446    pub seconds: Option<f64>,
2447    /// A boolean flag indicating if date time is in utc time. If false, the date time is in
2448    /// local time
2449    #[serde(skip_serializing_if = "Option::is_none")]
2450    #[builder(default)]
2451    pub utc: Option<bool>,
2452    /// Integer value representing the year.
2453    #[serde(skip_serializing_if = "Option::is_none")]
2454    #[builder(default)]
2455    pub year: Option<f64>,
2456    /// Vega expression (which can refer to Vega-Lite parameters).
2457    #[serde(skip_serializing_if = "Option::is_none")]
2458    #[builder(default)]
2459    pub expr: Option<String>,
2460}
2461
2462/// Time unit for the field to be tested.
2463///
2464/// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
2465/// temporal field that gets casted as
2466/// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
2467///
2468/// __Default value:__ `undefined` (None)
2469///
2470/// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
2471/// documentation.
2472#[derive(Debug, Clone, Serialize, Deserialize)]
2473#[serde(untagged)]
2474#[derive(From)]
2475pub enum LogicalNotPredicateTimeUnit {
2476    Enum(BinnedTimeUnitEnum),
2477    TimeUnitParams(TimeUnitParams),
2478}
2479
2480/// Time Unit Params for encoding predicate, which can specified if the data is  already
2481/// "binned".
2482#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
2483#[builder(setter(into, strip_option))]
2484pub struct TimeUnitParams {
2485    /// Whether the data has already been binned to this time unit. If true, Vega-Lite will only
2486    /// format the data, marks, and guides, without applying the timeUnit transform to re-bin the
2487    /// data again.
2488    #[serde(skip_serializing_if = "Option::is_none")]
2489    #[builder(default)]
2490    pub binned: Option<bool>,
2491    /// If no `unit` is specified, maxbins is used to infer time units.
2492    #[serde(skip_serializing_if = "Option::is_none")]
2493    #[builder(default)]
2494    pub maxbins: Option<f64>,
2495    /// The number of steps between bins, in terms of the least significant unit provided.
2496    #[serde(skip_serializing_if = "Option::is_none")]
2497    #[builder(default)]
2498    pub step: Option<f64>,
2499    /// Defines how date-time values should be binned.
2500    #[serde(skip_serializing_if = "Option::is_none")]
2501    #[builder(default)]
2502    pub unit: Option<TimeUnit>,
2503    /// True to use UTC timezone. Equivalent to using a `utc` prefixed `TimeUnit`.
2504    #[serde(skip_serializing_if = "Option::is_none")]
2505    #[builder(default)]
2506    pub utc: Option<bool>,
2507}
2508
2509/// Defines how date-time values should be binned.
2510#[derive(Debug, Clone, Serialize, Deserialize)]
2511#[serde(rename_all = "snake_case")]
2512pub enum TimeUnit {
2513    Date,
2514    Day,
2515    Dayhours,
2516    Dayhoursminutes,
2517    Dayhoursminutesseconds,
2518    Dayofyear,
2519    Hours,
2520    Hoursminutes,
2521    Hoursminutesseconds,
2522    Milliseconds,
2523    Minutes,
2524    Minutesseconds,
2525    Month,
2526    Monthdate,
2527    Monthdatehours,
2528    Monthdatehoursminutes,
2529    Monthdatehoursminutesseconds,
2530    Quarter,
2531    Quartermonth,
2532    Seconds,
2533    Secondsmilliseconds,
2534    Utcdate,
2535    Utcday,
2536    Utcdayhours,
2537    Utcdayhoursminutes,
2538    Utcdayhoursminutesseconds,
2539    Utcdayofyear,
2540    Utchours,
2541    Utchoursminutes,
2542    Utchoursminutesseconds,
2543    Utcmilliseconds,
2544    Utcminutes,
2545    Utcminutesseconds,
2546    Utcmonth,
2547    Utcmonthdate,
2548    Utcmonthdatehours,
2549    Utcmonthdatehoursminutes,
2550    Utcmonthdatehoursminutesseconds,
2551    Utcquarter,
2552    Utcquartermonth,
2553    Utcseconds,
2554    Utcsecondsmilliseconds,
2555    Utcweek,
2556    Utcweekday,
2557    Utcweekdayhours,
2558    Utcweekdayhoursminutes,
2559    Utcweekdayhoursminutesseconds,
2560    Utcyear,
2561    Utcyeardayofyear,
2562    Utcyearmonth,
2563    Utcyearmonthdate,
2564    Utcyearmonthdatehours,
2565    Utcyearmonthdatehoursminutes,
2566    Utcyearmonthdatehoursminutesseconds,
2567    Utcyearquarter,
2568    Utcyearquartermonth,
2569    Utcyearweek,
2570    Utcyearweekday,
2571    Utcyearweekdayhours,
2572    Utcyearweekdayhoursminutes,
2573    Utcyearweekdayhoursminutesseconds,
2574    Week,
2575    Weekday,
2576    Weekdayhours,
2577    Weekdayhoursminutes,
2578    Weekdayhoursminutesseconds,
2579    Year,
2580    Yeardayofyear,
2581    Yearmonth,
2582    Yearmonthdate,
2583    Yearmonthdatehours,
2584    Yearmonthdatehoursminutes,
2585    Yearmonthdatehoursminutesseconds,
2586    Yearquarter,
2587    Yearquartermonth,
2588    Yearweek,
2589    Yearweekday,
2590    Yearweekdayhours,
2591    Yearweekdayhoursminutes,
2592    Yearweekdayhoursminutesseconds,
2593}
2594
2595#[derive(Debug, Clone, Serialize, Deserialize)]
2596#[serde(rename_all = "snake_case")]
2597pub enum BinnedTimeUnitEnum {
2598    Binnedutcyear,
2599    Binnedutcyeardayofyear,
2600    Binnedutcyearmonth,
2601    Binnedutcyearmonthdate,
2602    Binnedutcyearmonthdatehours,
2603    Binnedutcyearmonthdatehoursminutes,
2604    Binnedutcyearmonthdatehoursminutesseconds,
2605    Binnedutcyearquarter,
2606    Binnedutcyearquartermonth,
2607    Binnedutcyearweek,
2608    Binnedutcyearweekday,
2609    Binnedutcyearweekdayhours,
2610    Binnedutcyearweekdayhoursminutes,
2611    Binnedutcyearweekdayhoursminutesseconds,
2612    Binnedyear,
2613    Binnedyeardayofyear,
2614    Binnedyearmonth,
2615    Binnedyearmonthdate,
2616    Binnedyearmonthdatehours,
2617    Binnedyearmonthdatehoursminutes,
2618    Binnedyearmonthdatehoursminutesseconds,
2619    Binnedyearquarter,
2620    Binnedyearquartermonth,
2621    Binnedyearweek,
2622    Binnedyearweekday,
2623    Binnedyearweekdayhours,
2624    Binnedyearweekdayhoursminutes,
2625    Binnedyearweekdayhoursminutesseconds,
2626    Date,
2627    Day,
2628    Dayhours,
2629    Dayhoursminutes,
2630    Dayhoursminutesseconds,
2631    Dayofyear,
2632    Hours,
2633    Hoursminutes,
2634    Hoursminutesseconds,
2635    Milliseconds,
2636    Minutes,
2637    Minutesseconds,
2638    Month,
2639    Monthdate,
2640    Monthdatehours,
2641    Monthdatehoursminutes,
2642    Monthdatehoursminutesseconds,
2643    Quarter,
2644    Quartermonth,
2645    Seconds,
2646    Secondsmilliseconds,
2647    Utcdate,
2648    Utcday,
2649    Utcdayhours,
2650    Utcdayhoursminutes,
2651    Utcdayhoursminutesseconds,
2652    Utcdayofyear,
2653    Utchours,
2654    Utchoursminutes,
2655    Utchoursminutesseconds,
2656    Utcmilliseconds,
2657    Utcminutes,
2658    Utcminutesseconds,
2659    Utcmonth,
2660    Utcmonthdate,
2661    Utcmonthdatehours,
2662    Utcmonthdatehoursminutes,
2663    Utcmonthdatehoursminutesseconds,
2664    Utcquarter,
2665    Utcquartermonth,
2666    Utcseconds,
2667    Utcsecondsmilliseconds,
2668    Utcweek,
2669    Utcweekday,
2670    Utcweekdayhours,
2671    Utcweekdayhoursminutes,
2672    Utcweekdayhoursminutesseconds,
2673    Utcyear,
2674    Utcyeardayofyear,
2675    Utcyearmonth,
2676    Utcyearmonthdate,
2677    Utcyearmonthdatehours,
2678    Utcyearmonthdatehoursminutes,
2679    Utcyearmonthdatehoursminutesseconds,
2680    Utcyearquarter,
2681    Utcyearquartermonth,
2682    Utcyearweek,
2683    Utcyearweekday,
2684    Utcyearweekdayhours,
2685    Utcyearweekdayhoursminutes,
2686    Utcyearweekdayhoursminutesseconds,
2687    Week,
2688    Weekday,
2689    Weekdayhours,
2690    Weekdayhoursminutes,
2691    Weekdayhoursminutesseconds,
2692    Year,
2693    Yeardayofyear,
2694    Yearmonth,
2695    Yearmonthdate,
2696    Yearmonthdatehours,
2697    Yearmonthdatehoursminutes,
2698    Yearmonthdatehoursminutesseconds,
2699    Yearquarter,
2700    Yearquartermonth,
2701    Yearweek,
2702    Yearweekday,
2703    Yearweekdayhours,
2704    Yearweekdayhoursminutes,
2705    Yearweekdayhoursminutesseconds,
2706}
2707
2708#[derive(Debug, Clone, Serialize, Deserialize)]
2709#[serde(untagged)]
2710#[derive(From)]
2711pub enum ConditionalValueDefNumberExprRefValue {
2712    BackgroundExprRef(BackgroundExprRef),
2713    Double(f64),
2714}
2715
2716#[derive(Debug, Clone, Serialize, Deserialize)]
2717#[serde(rename_all = "camelCase")]
2718#[derive(Default, Builder)]
2719#[builder(setter(into, strip_option))]
2720pub struct ConditionalPredicateValueDefNumberExprRefClass {
2721    /// Predicate for triggering the condition
2722    #[serde(skip_serializing_if = "Option::is_none")]
2723    #[builder(default)]
2724    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
2725    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
2726    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
2727    /// between `0` to `1` for opacity).
2728    #[serde(skip_serializing_if = "Option::is_none")]
2729    #[builder(default)]
2730    pub value: Option<CornerRadiusUnion>,
2731    /// For selection parameters, the predicate of empty selections returns true by default.
2732    /// Override this behavior, by setting this property `empty: false`.
2733    #[serde(skip_serializing_if = "Option::is_none")]
2734    #[builder(default)]
2735    pub empty: Option<bool>,
2736    /// Filter using a parameter name.
2737    #[serde(skip_serializing_if = "Option::is_none")]
2738    #[builder(default)]
2739    pub param: Option<String>,
2740    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
2741    /// `"max"`, `"count"`).
2742    ///
2743    /// __Default value:__ `undefined` (None)
2744    ///
2745    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
2746    /// documentation.
2747    #[serde(skip_serializing_if = "Option::is_none")]
2748    #[builder(default)]
2749    pub aggregate: Option<Aggregate>,
2750    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
2751    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
2752    /// middle of the band if set to `0.5`.
2753    #[serde(skip_serializing_if = "Option::is_none")]
2754    #[builder(default)]
2755    pub band_position: Option<f64>,
2756    /// A flag for binning a `quantitative` field, [an object defining binning
2757    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
2758    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
2759    /// (`"binned"`).
2760    ///
2761    /// - If `true`, default [binning
2762    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
2763    /// applied.
2764    ///
2765    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
2766    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
2767    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
2768    /// the axis ticks based on the bin step, you can also set the axis's
2769    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
2770    ///
2771    /// __Default value:__ `false`
2772    ///
2773    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
2774    #[serde(skip_serializing_if = "Option::is_none")]
2775    #[builder(default)]
2776    pub bin: Option<AngleBin>,
2777    /// __Required.__ A string defining the name of the field from which to pull a data value or
2778    /// an object defining iterated values from the
2779    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
2780    ///
2781    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
2782    ///
2783    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
2784    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
2785    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
2786    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
2787    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
2788    /// required if `aggregate` is `count`.
2789    #[serde(skip_serializing_if = "Option::is_none")]
2790    #[builder(default)]
2791    pub field: Option<Field>,
2792    /// An object defining properties of the legend. If `null`, the legend for the encoding
2793    /// channel will be removed.
2794    ///
2795    /// __Default value:__ If undefined, default [legend
2796    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
2797    ///
2798    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
2799    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
2800    #[builder(default)]
2801    pub legend: RemovableValue<Legend>,
2802    /// An object defining properties of the channel's scale, which is the function that
2803    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
2804    /// (pixels, colors, sizes) of the encoding channels.
2805    ///
2806    /// If `null`, the scale will be [disabled and the data value will be directly
2807    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
2808    ///
2809    /// __Default value:__ If undefined, default [scale
2810    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
2811    ///
2812    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
2813    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
2814    #[builder(default)]
2815    pub scale: RemovableValue<Scale>,
2816    /// Sort order for the encoded field.
2817    ///
2818    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
2819    /// `"descending"`.
2820    ///
2821    /// For discrete fields, `sort` can be one of the following:
2822    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
2823    /// JavaScript.
2824    /// - [A string indicating an encoding channel name to sort
2825    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
2826    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
2827    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
2828    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
2829    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
2830    /// "descending"}`.
2831    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
2832    /// for sorting by another field.
2833    /// - [An array specifying the field values in preferred
2834    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
2835    /// sort order will obey the values in the array, followed by any unspecified values in their
2836    /// original order. For discrete time field, values in the sort array can be [date-time
2837    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
2838    /// the values can be the month or day names (case insensitive) or their 3-letter initials
2839    /// (e.g., `"Mon"`, `"Tue"`).
2840    /// - `null` indicating no sort.
2841    ///
2842    /// __Default value:__ `"ascending"`
2843    ///
2844    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
2845    ///
2846    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
2847    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
2848    #[builder(default)]
2849    pub sort: RemovableValue<SortUnion>,
2850    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
2851    /// temporal field that gets casted as
2852    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
2853    ///
2854    /// __Default value:__ `undefined` (None)
2855    ///
2856    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
2857    /// documentation.
2858    #[serde(skip_serializing_if = "Option::is_none")]
2859    #[builder(default)]
2860    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
2861    /// A title for the field. If `null`, the title will be removed.
2862    ///
2863    /// __Default value:__  derived from the field's name and transformation function
2864    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
2865    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
2866    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
2867    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
2868    /// name.
2869    ///
2870    /// __Notes__:
2871    ///
2872    /// 1) You can customize the default field title format by providing the
2873    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
2874    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
2875    /// [`fieldTitle` function via the `compile` function's
2876    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
2877    ///
2878    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
2879    /// axis/header/legend title will be used.
2880    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
2881    #[builder(default)]
2882    pub title: RemovableValue<LegendText>,
2883    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
2884    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
2885    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
2886    ///
2887    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
2888    /// is required for a field if: (1) the field is not nominal and the field encoding has no
2889    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
2890    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
2891    /// or `timeUnit`.
2892    ///
2893    /// __Default value:__
2894    ///
2895    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
2896    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
2897    /// following criteria:
2898    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
2899    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
2900    /// `longitude` channel or (3) if the specified scale type is [a quantitative
2901    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
2902    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
2903    /// the specified scale type is a time or utc scale
2904    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
2905    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
2906    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
2907    /// `order`.
2908    ///
2909    /// 2) For a constant value in data domain (`datum`):
2910    /// - `"quantitative"` if the datum is a number
2911    /// - `"nominal"` if the datum is a string
2912    /// - `"temporal"` if the datum is [a date time
2913    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
2914    ///
2915    /// __Note:__
2916    /// - Data `type` describes the semantics of the data rather than the primitive data types
2917    /// (number, string, etc.). The same primitive data type can have different types of
2918    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
2919    /// data.
2920    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
2921    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
2922    /// `1552199579097`).
2923    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
2924    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
2925    /// (for using an ordinal bin
2926    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
2927    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
2928    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
2929    /// [`"ordinal"` (for using an ordinal
2930    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
2931    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
2932    /// the `type` property refers to the post-aggregation data type. For example, we can
2933    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
2934    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
2935    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
2936    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
2937    ///
2938    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
2939    #[serde(rename = "type")]
2940    #[serde(skip_serializing_if = "Option::is_none")]
2941    #[builder(default)]
2942    pub conditional_p_value_def_number_expr_ref_type: Option<Type>,
2943    /// A constant value in data domain.
2944    #[serde(skip_serializing_if = "Option::is_none")]
2945    #[builder(default)]
2946    pub datum: Option<PrimitiveValue>,
2947}
2948
2949/// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
2950/// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
2951/// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
2952///
2953/// Vega-Lite automatically infers data types in many cases as discussed below. However, type
2954/// is required for a field if: (1) the field is not nominal and the field encoding has no
2955/// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
2956/// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
2957/// or `timeUnit`.
2958///
2959/// __Default value:__
2960///
2961/// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
2962/// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
2963/// following criteria:
2964/// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
2965/// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
2966/// `longitude` channel or (3) if the specified scale type is [a quantitative
2967/// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
2968/// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
2969/// the specified scale type is a time or utc scale
2970/// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
2971/// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
2972/// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
2973/// `order`.
2974///
2975/// 2) For a constant value in data domain (`datum`):
2976/// - `"quantitative"` if the datum is a number
2977/// - `"nominal"` if the datum is a string
2978/// - `"temporal"` if the datum is [a date time
2979/// object](https://vega.github.io/vega-lite/docs/datetime.html)
2980///
2981/// __Note:__
2982/// - Data `type` describes the semantics of the data rather than the primitive data types
2983/// (number, string, etc.). The same primitive data type can have different types of
2984/// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
2985/// data.
2986/// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
2987/// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
2988/// `1552199579097`).
2989/// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
2990/// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
2991/// (for using an ordinal bin
2992/// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
2993/// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
2994/// `type` property can be either `"temporal"` (default, for using a temporal scale) or
2995/// [`"ordinal"` (for using an ordinal
2996/// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
2997/// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
2998/// the `type` property refers to the post-aggregation data type. For example, we can
2999/// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
3000/// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
3001/// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
3002/// must have exactly the same type as their primary channels (e.g., `x`, `y`).
3003///
3004/// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
3005///
3006/// Data type based on level of measurement
3007#[derive(Debug, Clone, Serialize, Deserialize)]
3008#[serde(rename_all = "snake_case")]
3009pub enum Type {
3010    Geojson,
3011    Nominal,
3012    Ordinal,
3013    Quantitative,
3014    Temporal,
3015}
3016
3017/// A constant value in data domain.
3018#[derive(Debug, Clone, Serialize, Deserialize)]
3019#[serde(untagged)]
3020#[derive(From)]
3021pub enum PrimitiveValue {
3022    Bool(bool),
3023    Double(f64),
3024    RepeatRefClass(RepeatRefClass),
3025    String(String),
3026}
3027
3028/// Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
3029/// month has higher precedence. `day` cannot be combined with other date. We accept string
3030/// for month and day names.
3031///
3032/// An expression for an array of raw values that, if non-null, directly overrides the
3033/// _domain_ property. This is useful for supporting interactions such as panning or zooming
3034/// a scale. The scale may be initially determined using a data-driven domain, then modified
3035/// in response to user input by setting the rawDomain value.
3036///
3037/// Reference to a repeated value.
3038#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
3039#[builder(setter(into, strip_option))]
3040pub struct RepeatRefClass {
3041    /// Integer value representing the date (day of the month) from 1-31.
3042    #[serde(skip_serializing_if = "Option::is_none")]
3043    #[builder(default)]
3044    pub date: Option<f64>,
3045    /// Value representing the day of a week. This can be one of: (1) integer value -- `1`
3046    /// represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
3047    /// case-insensitive, 3-character short day name (e.g., `"Mon"`).
3048    ///
3049    /// **Warning:** A DateTime definition object with `day`** should not be combined with
3050    /// `year`, `quarter`, `month`, or `date`.
3051    #[serde(skip_serializing_if = "Option::is_none")]
3052    #[builder(default)]
3053    pub day: Option<DayUnion>,
3054    /// Integer value representing the hour of a day from 0-23.
3055    #[serde(skip_serializing_if = "Option::is_none")]
3056    #[builder(default)]
3057    pub hours: Option<f64>,
3058    /// Integer value representing the millisecond segment of time.
3059    #[serde(skip_serializing_if = "Option::is_none")]
3060    #[builder(default)]
3061    pub milliseconds: Option<f64>,
3062    /// Integer value representing the minute segment of time from 0-59.
3063    #[serde(skip_serializing_if = "Option::is_none")]
3064    #[builder(default)]
3065    pub minutes: Option<f64>,
3066    /// One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
3067    /// (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
3068    /// short month name (e.g., `"Jan"`).
3069    #[serde(skip_serializing_if = "Option::is_none")]
3070    #[builder(default)]
3071    pub month: Option<Month>,
3072    /// Integer value representing the quarter of the year (from 1-4).
3073    #[serde(skip_serializing_if = "Option::is_none")]
3074    #[builder(default)]
3075    pub quarter: Option<f64>,
3076    /// Integer value representing the second segment (0-59) of a time value
3077    #[serde(skip_serializing_if = "Option::is_none")]
3078    #[builder(default)]
3079    pub seconds: Option<f64>,
3080    /// A boolean flag indicating if date time is in utc time. If false, the date time is in
3081    /// local time
3082    #[serde(skip_serializing_if = "Option::is_none")]
3083    #[builder(default)]
3084    pub utc: Option<bool>,
3085    /// Integer value representing the year.
3086    #[serde(skip_serializing_if = "Option::is_none")]
3087    #[builder(default)]
3088    pub year: Option<f64>,
3089    /// Vega expression (which can refer to Vega-Lite parameters).
3090    #[serde(skip_serializing_if = "Option::is_none")]
3091    #[builder(default)]
3092    pub expr: Option<String>,
3093    #[serde(skip_serializing_if = "Option::is_none")]
3094    #[builder(default)]
3095    pub repeat: Option<RepeatEnum>,
3096}
3097
3098#[derive(Debug, Clone, Serialize, Deserialize)]
3099#[serde(rename_all = "snake_case")]
3100pub enum RepeatEnum {
3101    Column,
3102    Layer,
3103    Repeat,
3104    Row,
3105}
3106
3107/// __Required.__ A string defining the name of the field from which to pull a data value or
3108/// an object defining iterated values from the
3109/// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
3110///
3111/// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
3112///
3113/// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
3114/// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
3115/// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
3116/// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
3117/// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
3118/// required if `aggregate` is `count`.
3119///
3120/// The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.
3121///
3122/// __Default value:__ If unspecified, defaults to the field specified in the outer data
3123/// reference.
3124#[derive(Debug, Clone, Serialize, Deserialize)]
3125#[serde(untagged)]
3126#[derive(From)]
3127pub enum Field {
3128    RepeatRef(RepeatRef),
3129    String(String),
3130}
3131
3132/// Reference to a repeated value.
3133#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
3134#[builder(setter(into, strip_option))]
3135pub struct RepeatRef {
3136    #[serde(skip_serializing_if = "Option::is_none")]
3137    #[builder(default)]
3138    pub repeat: Option<RepeatEnum>,
3139}
3140
3141/// Properties of a legend or boolean flag for determining whether to show it.
3142#[derive(Debug, Clone, Serialize, Deserialize)]
3143#[serde(rename_all = "camelCase")]
3144#[derive(Default, Builder)]
3145#[builder(setter(into, strip_option))]
3146pub struct Legend {
3147    #[serde(skip_serializing_if = "Option::is_none")]
3148    #[builder(default)]
3149    pub aria: Option<Aria>,
3150    #[serde(skip_serializing_if = "Option::is_none")]
3151    #[builder(default)]
3152    pub clip_height: Option<CornerRadiusUnion>,
3153    #[serde(skip_serializing_if = "Option::is_none")]
3154    #[builder(default)]
3155    pub column_padding: Option<CornerRadiusUnion>,
3156    #[serde(skip_serializing_if = "Option::is_none")]
3157    #[builder(default)]
3158    pub columns: Option<CornerRadiusUnion>,
3159    #[serde(skip_serializing_if = "Option::is_none")]
3160    #[builder(default)]
3161    pub corner_radius: Option<CornerRadiusUnion>,
3162    #[serde(skip_serializing_if = "Option::is_none")]
3163    #[builder(default)]
3164    pub description: Option<Box<Color>>,
3165    /// The direction of the legend, one of `"vertical"` or `"horizontal"`.
3166    ///
3167    /// __Default value:__
3168    /// - For top-/bottom-`orient`ed legends, `"horizontal"`
3169    /// - For left-/right-`orient`ed legends, `"vertical"`
3170    /// - For top/bottom-left/right-`orient`ed legends, `"horizontal"` for gradient legends and
3171    /// `"vertical"` for symbol legends.
3172    #[serde(skip_serializing_if = "Option::is_none")]
3173    #[builder(default)]
3174    pub direction: Option<Orientation>,
3175    #[serde(skip_serializing_if = "Option::is_none")]
3176    #[builder(default)]
3177    pub fill_color: Option<Box<Color>>,
3178    /// When used with the default `"number"` and `"time"` format type, the text formatting
3179    /// pattern for labels of guides (axes, legends, headers) and text marks.
3180    ///
3181    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
3182    /// format pattern](https://github.com/d3/d3-format#locale_format).
3183    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
3184    /// pattern](https://github.com/d3/d3-time-format#locale_format).
3185    ///
3186    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
3187    /// more examples.
3188    ///
3189    /// When used with a [custom
3190    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
3191    /// value will be passed as `format` alongside `datum.value` to the registered function.
3192    ///
3193    /// __Default value:__  Derived from
3194    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
3195    /// number format and from
3196    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
3197    /// format.
3198    #[serde(skip_serializing_if = "Option::is_none")]
3199    #[builder(default)]
3200    pub format: Option<Format>,
3201    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
3202    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
3203    ///
3204    /// __Default value:__
3205    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
3206    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
3207    /// `timeUnit`.
3208    #[serde(skip_serializing_if = "Option::is_none")]
3209    #[builder(default)]
3210    pub format_type: Option<String>,
3211    #[serde(skip_serializing_if = "Option::is_none")]
3212    #[builder(default)]
3213    pub gradient_length: Option<FontSize>,
3214    #[serde(skip_serializing_if = "Option::is_none")]
3215    #[builder(default)]
3216    pub gradient_opacity: Option<CornerRadiusUnion>,
3217    #[serde(skip_serializing_if = "Option::is_none")]
3218    #[builder(default)]
3219    pub gradient_stroke_color: Option<Box<Color>>,
3220    #[serde(skip_serializing_if = "Option::is_none")]
3221    #[builder(default)]
3222    pub gradient_stroke_width: Option<FontSize>,
3223    #[serde(skip_serializing_if = "Option::is_none")]
3224    #[builder(default)]
3225    pub gradient_thickness: Option<FontSize>,
3226    #[serde(skip_serializing_if = "Option::is_none")]
3227    #[builder(default)]
3228    pub grid_align: Option<GridAlign>,
3229    #[serde(skip_serializing_if = "Option::is_none")]
3230    #[builder(default)]
3231    pub label_align: Option<TitleAlignUnion>,
3232    #[serde(skip_serializing_if = "Option::is_none")]
3233    #[builder(default)]
3234    pub label_baseline: Option<TextBaseline>,
3235    #[serde(skip_serializing_if = "Option::is_none")]
3236    #[builder(default)]
3237    pub label_color: Option<Box<Color>>,
3238    /// [Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.
3239    ///
3240    /// __Note:__ The label text and value can be assessed via the `label` and `value` properties
3241    /// of the legend's backing `datum` object.
3242    #[serde(skip_serializing_if = "Option::is_none")]
3243    #[builder(default)]
3244    pub label_expr: Option<String>,
3245    #[serde(skip_serializing_if = "Option::is_none")]
3246    #[builder(default)]
3247    pub label_font: Option<Box<Color>>,
3248    #[serde(skip_serializing_if = "Option::is_none")]
3249    #[builder(default)]
3250    pub label_font_size: Option<FontSize>,
3251    #[serde(skip_serializing_if = "Option::is_none")]
3252    #[builder(default)]
3253    pub label_font_style: Option<Box<Color>>,
3254    #[serde(skip_serializing_if = "Option::is_none")]
3255    #[builder(default)]
3256    pub label_font_weight: Option<FontWeightUnion>,
3257    #[serde(skip_serializing_if = "Option::is_none")]
3258    #[builder(default)]
3259    pub label_limit: Option<CornerRadiusUnion>,
3260    #[serde(skip_serializing_if = "Option::is_none")]
3261    #[builder(default)]
3262    pub label_offset: Option<FontSize>,
3263    #[serde(skip_serializing_if = "Option::is_none")]
3264    #[builder(default)]
3265    pub label_opacity: Option<CornerRadiusUnion>,
3266    #[serde(skip_serializing_if = "Option::is_none")]
3267    #[builder(default)]
3268    pub label_overlap: Option<LabelOverlapUnion>,
3269    #[serde(skip_serializing_if = "Option::is_none")]
3270    #[builder(default)]
3271    pub label_padding: Option<CornerRadiusUnion>,
3272    #[serde(skip_serializing_if = "Option::is_none")]
3273    #[builder(default)]
3274    pub label_separation: Option<CornerRadiusUnion>,
3275    #[serde(skip_serializing_if = "Option::is_none")]
3276    #[builder(default)]
3277    pub legend_x: Option<CornerRadiusUnion>,
3278    #[serde(skip_serializing_if = "Option::is_none")]
3279    #[builder(default)]
3280    pub legend_y: Option<CornerRadiusUnion>,
3281    #[serde(skip_serializing_if = "Option::is_none")]
3282    #[builder(default)]
3283    pub offset: Option<CornerRadiusUnion>,
3284    /// The orientation of the legend, which determines how the legend is positioned within the
3285    /// scene. One of `"left"`, `"right"`, `"top"`, `"bottom"`, `"top-left"`, `"top-right"`,
3286    /// `"bottom-left"`, `"bottom-right"`, `"none"`.
3287    ///
3288    /// __Default value:__ `"right"`
3289    #[serde(skip_serializing_if = "Option::is_none")]
3290    #[builder(default)]
3291    pub orient: Option<LegendOrient>,
3292    #[serde(skip_serializing_if = "Option::is_none")]
3293    #[builder(default)]
3294    pub padding: Option<CornerRadiusUnion>,
3295    #[serde(skip_serializing_if = "Option::is_none")]
3296    #[builder(default)]
3297    pub row_padding: Option<CornerRadiusUnion>,
3298    #[serde(skip_serializing_if = "Option::is_none")]
3299    #[builder(default)]
3300    pub stroke_color: Option<Box<Color>>,
3301    #[serde(skip_serializing_if = "Option::is_none")]
3302    #[builder(default)]
3303    pub symbol_dash: Option<StrokeDashUnion>,
3304    #[serde(skip_serializing_if = "Option::is_none")]
3305    #[builder(default)]
3306    pub symbol_dash_offset: Option<CornerRadiusUnion>,
3307    #[serde(skip_serializing_if = "Option::is_none")]
3308    #[builder(default)]
3309    pub symbol_fill_color: Option<Box<Color>>,
3310    #[serde(skip_serializing_if = "Option::is_none")]
3311    #[builder(default)]
3312    pub symbol_limit: Option<CornerRadiusUnion>,
3313    #[serde(skip_serializing_if = "Option::is_none")]
3314    #[builder(default)]
3315    pub symbol_offset: Option<CornerRadiusUnion>,
3316    #[serde(skip_serializing_if = "Option::is_none")]
3317    #[builder(default)]
3318    pub symbol_opacity: Option<CornerRadiusUnion>,
3319    #[serde(skip_serializing_if = "Option::is_none")]
3320    #[builder(default)]
3321    pub symbol_size: Option<FontSize>,
3322    #[serde(skip_serializing_if = "Option::is_none")]
3323    #[builder(default)]
3324    pub symbol_stroke_color: Option<Box<Color>>,
3325    #[serde(skip_serializing_if = "Option::is_none")]
3326    #[builder(default)]
3327    pub symbol_stroke_width: Option<FontSize>,
3328    #[serde(skip_serializing_if = "Option::is_none")]
3329    #[builder(default)]
3330    pub symbol_type: Option<Box<Color>>,
3331    #[serde(skip_serializing_if = "Option::is_none")]
3332    #[builder(default)]
3333    pub tick_count: Option<TickCount>,
3334    /// The minimum desired step between legend ticks, in terms of scale domain values. For
3335    /// example, a value of `1` indicates that ticks should not be less than 1 unit apart. If
3336    /// `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to
3337    /// enforce the minimum step value.
3338    ///
3339    /// __Default value__: `undefined`
3340    #[serde(skip_serializing_if = "Option::is_none")]
3341    #[builder(default)]
3342    pub tick_min_step: Option<CornerRadiusUnion>,
3343    /// A title for the field. If `null`, the title will be removed.
3344    ///
3345    /// __Default value:__  derived from the field's name and transformation function
3346    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
3347    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
3348    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
3349    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
3350    /// name.
3351    ///
3352    /// __Notes__:
3353    ///
3354    /// 1) You can customize the default field title format by providing the
3355    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
3356    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
3357    /// [`fieldTitle` function via the `compile` function's
3358    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
3359    ///
3360    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
3361    /// axis/header/legend title will be used.
3362    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
3363    #[builder(default)]
3364    pub title: RemovableValue<LegendText>,
3365    #[serde(skip_serializing_if = "Option::is_none")]
3366    #[builder(default)]
3367    pub title_align: Option<TitleAlignUnion>,
3368    #[serde(skip_serializing_if = "Option::is_none")]
3369    #[builder(default)]
3370    pub title_anchor: Option<TitleAnchorUnion>,
3371    #[serde(skip_serializing_if = "Option::is_none")]
3372    #[builder(default)]
3373    pub title_baseline: Option<TextBaseline>,
3374    #[serde(skip_serializing_if = "Option::is_none")]
3375    #[builder(default)]
3376    pub title_color: Option<Box<Color>>,
3377    #[serde(skip_serializing_if = "Option::is_none")]
3378    #[builder(default)]
3379    pub title_font: Option<Box<Color>>,
3380    #[serde(skip_serializing_if = "Option::is_none")]
3381    #[builder(default)]
3382    pub title_font_size: Option<CornerRadiusUnion>,
3383    #[serde(skip_serializing_if = "Option::is_none")]
3384    #[builder(default)]
3385    pub title_font_style: Option<Box<Color>>,
3386    #[serde(skip_serializing_if = "Option::is_none")]
3387    #[builder(default)]
3388    pub title_font_weight: Option<FontWeightUnion>,
3389    #[serde(skip_serializing_if = "Option::is_none")]
3390    #[builder(default)]
3391    pub title_limit: Option<FontSize>,
3392    #[serde(skip_serializing_if = "Option::is_none")]
3393    #[builder(default)]
3394    pub title_line_height: Option<CornerRadiusUnion>,
3395    #[serde(skip_serializing_if = "Option::is_none")]
3396    #[builder(default)]
3397    pub title_opacity: Option<CornerRadiusUnion>,
3398    #[serde(skip_serializing_if = "Option::is_none")]
3399    #[builder(default)]
3400    pub title_orient: Option<TitleOrientUnion>,
3401    #[serde(skip_serializing_if = "Option::is_none")]
3402    #[builder(default)]
3403    pub title_padding: Option<CornerRadiusUnion>,
3404    /// The type of the legend. Use `"symbol"` to create a discrete legend and `"gradient"` for a
3405    /// continuous color gradient.
3406    ///
3407    /// __Default value:__ `"gradient"` for non-binned quantitative fields and temporal fields;
3408    /// `"symbol"` otherwise.
3409    #[serde(rename = "type")]
3410    #[serde(skip_serializing_if = "Option::is_none")]
3411    #[builder(default)]
3412    pub legend_type: Option<LegendType>,
3413    /// Explicitly set the visible legend values.
3414    #[serde(skip_serializing_if = "Option::is_none")]
3415    #[builder(default)]
3416    pub values: Option<Values>,
3417    /// A non-negative integer indicating the z-index of the legend. If zindex is 0, legend
3418    /// should be drawn behind all chart elements. To put them in front, use zindex = 1.
3419    #[serde(skip_serializing_if = "Option::is_none")]
3420    #[builder(default)]
3421    pub zindex: Option<f64>,
3422}
3423
3424#[derive(Debug, Clone, Serialize, Deserialize)]
3425#[serde(untagged)]
3426#[derive(From)]
3427pub enum Aria {
3428    BackgroundExprRef(BackgroundExprRef),
3429    Bool(bool),
3430}
3431
3432#[derive(Debug, Clone, Serialize, Deserialize)]
3433#[serde(untagged)]
3434#[derive(From)]
3435pub enum CornerRadiusUnion {
3436    BackgroundExprRef(BackgroundExprRef),
3437    Double(f64),
3438}
3439
3440/// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
3441/// horizontal (default) or vertical.
3442/// - For bar, rule and tick, this determines whether the size of the bar and tick should be
3443/// applied to x or y dimension.
3444/// - For area, this property determines the orient property of the Vega output.
3445/// - For line and trail marks, this property determines the sort order of the points in the
3446/// line if `config.sortLineBy` is not specified. For stacked charts, this is always
3447/// determined by the orientation of the stack; therefore explicitly specified value will be
3448/// ignored.
3449///
3450/// The direction of the legend, one of `"vertical"` or `"horizontal"`.
3451///
3452/// __Default value:__
3453/// - For top-/bottom-`orient`ed legends, `"horizontal"`
3454/// - For left-/right-`orient`ed legends, `"vertical"`
3455/// - For top/bottom-left/right-`orient`ed legends, `"horizontal"` for gradient legends and
3456/// `"vertical"` for symbol legends.
3457///
3458/// The default direction (`"horizontal"` or `"vertical"`) for gradient legends.
3459///
3460/// __Default value:__ `"vertical"`.
3461///
3462/// The default direction (`"horizontal"` or `"vertical"`) for symbol legends.
3463///
3464/// __Default value:__ `"vertical"`.
3465///
3466/// Orientation of the box plot. This is normally automatically determined based on types of
3467/// fields on x and y channels. However, an explicit `orient` be specified when the
3468/// orientation is ambiguous.
3469///
3470/// __Default value:__ `"vertical"`.
3471///
3472/// Orientation of the error bar. This is normally automatically determined, but can be
3473/// specified when the orientation is ambiguous and cannot be automatically determined.
3474///
3475/// Orientation of the error band. This is normally automatically determined, but can be
3476/// specified when the orientation is ambiguous and cannot be automatically determined.
3477#[derive(Debug, Clone, Serialize, Deserialize)]
3478#[serde(rename_all = "snake_case")]
3479pub enum Orientation {
3480    Horizontal,
3481    Vertical,
3482}
3483
3484#[derive(Debug, Clone, Serialize, Deserialize)]
3485#[serde(untagged)]
3486#[derive(From)]
3487pub enum Format {
3488    AnythingMap(HashMap<String, Option<serde_json::Value>>),
3489    String(String),
3490}
3491
3492#[derive(Debug, Clone, Serialize, Deserialize)]
3493#[serde(untagged)]
3494#[derive(From)]
3495pub enum FontSize {
3496    BackgroundExprRef(BackgroundExprRef),
3497    Double(f64),
3498}
3499
3500#[derive(Debug, Clone, Serialize, Deserialize)]
3501#[serde(untagged)]
3502#[derive(From)]
3503pub enum GridAlign {
3504    BackgroundExprRef(BackgroundExprRef),
3505    Enum(LayoutAlign),
3506}
3507
3508/// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
3509/// of `"left"`, `"right"`, `"center"`.
3510///
3511/// __Note:__ Expression reference is *not* supported for range marks.
3512///
3513/// Horizontal text alignment of header labels. One of `"left"`, `"center"`, or `"right"`.
3514///
3515/// Horizontal text alignment (to the anchor) of header titles.
3516#[derive(Debug, Clone, Serialize, Deserialize)]
3517#[serde(untagged)]
3518#[derive(From)]
3519pub enum TitleAlignUnion {
3520    BackgroundExprRef(BackgroundExprRef),
3521    Enum(Align),
3522}
3523
3524/// Horizontal text alignment of axis tick labels, overriding the default setting for the
3525/// current axis orientation.
3526///
3527/// Horizontal text alignment of axis titles.
3528///
3529/// The alignment of the legend label, can be left, center, or right.
3530///
3531/// Horizontal text alignment for legend titles.
3532///
3533/// __Default value:__ `"left"`.
3534///
3535/// Horizontal text alignment for title text. One of `"left"`, `"center"`, or `"right"`.
3536#[derive(Debug, Clone, Serialize, Deserialize)]
3537#[serde(rename_all = "snake_case")]
3538pub enum Align {
3539    Center,
3540    Left,
3541    Right,
3542}
3543
3544/// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
3545/// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
3546/// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
3547/// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
3548/// rather than `fontSize` alone.
3549///
3550/// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
3551/// `"bottom"`.
3552///
3553/// __Note:__ Expression reference is *not* supported for range marks.
3554///
3555/// The vertical text baseline for the header labels. One of `"alphabetic"` (default),
3556/// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
3557/// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
3558/// relative to the `titleLineHeight` rather than `titleFontSize` alone.
3559///
3560/// The vertical text baseline for the header title. One of `"alphabetic"` (default),
3561/// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
3562/// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
3563/// relative to the `titleLineHeight` rather than `titleFontSize` alone.
3564///
3565/// __Default value:__ `"middle"`
3566#[derive(Debug, Clone, Serialize, Deserialize)]
3567#[serde(untagged)]
3568#[derive(From)]
3569pub enum TextBaseline {
3570    BackgroundExprRef(BackgroundExprRef),
3571    Enum(Baseline),
3572}
3573
3574/// Vertical text baseline of axis tick labels, overriding the default setting for the
3575/// current axis orientation. One of `"alphabetic"` (default), `"top"`, `"middle"`,
3576/// `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values
3577/// operate similarly to `"top"` and `"bottom"`, but are calculated relative to the
3578/// *lineHeight* rather than *fontSize* alone.
3579///
3580/// Vertical text baseline for axis titles. One of `"alphabetic"` (default), `"top"`,
3581/// `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
3582/// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
3583/// relative to the *lineHeight* rather than *fontSize* alone.
3584///
3585/// The position of the baseline of legend label, can be `"top"`, `"middle"`, `"bottom"`, or
3586/// `"alphabetic"`.
3587///
3588/// __Default value:__ `"middle"`.
3589///
3590/// Vertical text baseline for legend titles.  One of `"alphabetic"` (default), `"top"`,
3591/// `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
3592/// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
3593/// relative to the *lineHeight* rather than *fontSize* alone.
3594///
3595/// __Default value:__ `"top"`.
3596///
3597/// Vertical text baseline for title and subtitle text. One of `"alphabetic"` (default),
3598/// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
3599/// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
3600/// relative to the *lineHeight* rather than *fontSize* alone.
3601#[derive(Debug, Clone, Serialize, Deserialize)]
3602#[serde(rename_all = "kebab-case")]
3603pub enum Baseline {
3604    Alphabetic,
3605    Bottom,
3606    #[serde(rename = "line-bottom")]
3607    LineBottom,
3608    #[serde(rename = "line-top")]
3609    LineTop,
3610    Middle,
3611    Top,
3612}
3613
3614/// The font weight of the header label.
3615///
3616/// Font weight of the header title. This can be either a string (e.g `"bold"`, `"normal"`)
3617/// or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` =
3618/// `700`).
3619#[derive(Debug, Clone, Serialize, Deserialize)]
3620#[serde(untagged)]
3621#[derive(From)]
3622pub enum FontWeightUnion {
3623    BackgroundExprRef(BackgroundExprRef),
3624    Double(f64),
3625    Enum(FontWeightEnum),
3626}
3627
3628#[derive(Debug, Clone, Serialize, Deserialize)]
3629#[serde(rename_all = "snake_case")]
3630pub enum FontWeightEnum {
3631    Bold,
3632    Bolder,
3633    Lighter,
3634    Normal,
3635}
3636
3637/// The strategy to use for resolving overlap of axis labels. If `false` (the default), no
3638/// overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
3639/// every other label is used (this works well for standard linear axes). If set to
3640/// `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps
3641/// with the last visible label (this often works better for log-scaled axes).
3642///
3643/// __Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log
3644/// scales; otherwise `false`.
3645///
3646/// The strategy to use for resolving overlap of labels in gradient legends. If `false`, no
3647/// overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
3648/// every other label is used. If set to `"greedy"`, a linear scan of the labels is
3649/// performed, removing any label that overlaps with the last visible label (this often works
3650/// better for log-scaled axes).
3651///
3652/// __Default value:__ `"greedy"` for `log scales otherwise `true`.
3653#[derive(Debug, Clone, Serialize, Deserialize)]
3654#[serde(untagged)]
3655#[derive(From)]
3656pub enum LabelOverlapUnion {
3657    BackgroundExprRef(BackgroundExprRef),
3658    Bool(bool),
3659    Enum(LabelOverlapEnum),
3660}
3661
3662#[derive(Debug, Clone, Serialize, Deserialize)]
3663#[serde(rename_all = "snake_case")]
3664pub enum LabelOverlapEnum {
3665    Greedy,
3666    Parity,
3667}
3668
3669/// The type of the legend. Use `"symbol"` to create a discrete legend and `"gradient"` for a
3670/// continuous color gradient.
3671///
3672/// __Default value:__ `"gradient"` for non-binned quantitative fields and temporal fields;
3673/// `"symbol"` otherwise.
3674#[derive(Debug, Clone, Serialize, Deserialize)]
3675#[serde(rename_all = "snake_case")]
3676pub enum LegendType {
3677    Gradient,
3678    Symbol,
3679}
3680
3681/// The orientation of the legend, which determines how the legend is positioned within the
3682/// scene. One of `"left"`, `"right"`, `"top"`, `"bottom"`, `"top-left"`, `"top-right"`,
3683/// `"bottom-left"`, `"bottom-right"`, `"none"`.
3684///
3685/// __Default value:__ `"right"`
3686#[derive(Debug, Clone, Serialize, Deserialize)]
3687#[serde(rename_all = "kebab-case")]
3688pub enum LegendOrient {
3689    Bottom,
3690    #[serde(rename = "bottom-left")]
3691    BottomLeft,
3692    #[serde(rename = "bottom-right")]
3693    BottomRight,
3694    Left,
3695    None,
3696    Right,
3697    Top,
3698    #[serde(rename = "top-left")]
3699    TopLeft,
3700    #[serde(rename = "top-right")]
3701    TopRight,
3702}
3703
3704/// The projection’s translation offset as a two-element array `[tx, ty]`.
3705///
3706/// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
3707/// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
3708/// between `0` to `1` for opacity).
3709#[derive(Debug, Clone, Serialize, Deserialize)]
3710#[serde(untagged)]
3711#[derive(From)]
3712pub enum StrokeDashUnion {
3713    BackgroundExprRef(BackgroundExprRef),
3714    DoubleArray(Vec<f64>),
3715}
3716
3717#[derive(Debug, Clone, Serialize, Deserialize)]
3718#[serde(untagged)]
3719#[derive(From)]
3720pub enum TickCount {
3721    Double(f64),
3722    Enum(TimeInterval),
3723    TickCountTimeIntervalStep(TickCountTimeIntervalStep),
3724}
3725
3726/// An expression for an array of raw values that, if non-null, directly overrides the
3727/// _domain_ property. This is useful for supporting interactions such as panning or zooming
3728/// a scale. The scale may be initially determined using a data-driven domain, then modified
3729/// in response to user input by setting the rawDomain value.
3730#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
3731#[builder(setter(into, strip_option))]
3732pub struct TickCountTimeIntervalStep {
3733    #[serde(skip_serializing_if = "Option::is_none")]
3734    #[builder(default)]
3735    pub interval: Option<TimeInterval>,
3736    #[serde(skip_serializing_if = "Option::is_none")]
3737    #[builder(default)]
3738    pub step: Option<f64>,
3739    /// Vega expression (which can refer to Vega-Lite parameters).
3740    #[serde(skip_serializing_if = "Option::is_none")]
3741    #[builder(default)]
3742    pub expr: Option<String>,
3743}
3744
3745#[derive(Debug, Clone, Serialize, Deserialize)]
3746#[serde(rename_all = "snake_case")]
3747pub enum TimeInterval {
3748    Day,
3749    Hour,
3750    Millisecond,
3751    Minute,
3752    Month,
3753    Second,
3754    Week,
3755    Year,
3756}
3757
3758/// A string or array of strings indicating the name of custom styles to apply to the mark. A
3759/// style is a named collection of mark property defaults defined within the [style
3760/// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
3761/// an array, later styles will override earlier styles. Any [mark
3762/// properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly
3763/// defined within the `encoding` will override a style default.
3764///
3765/// __Default value:__ The mark's name. For example, a bar mark will have style `"bar"` by
3766/// default. __Note:__ Any specified style will augment the default style. For example, a bar
3767/// mark with `"style": "foo"` will receive from `config.style.bar` and `config.style.foo`
3768/// (the specified style `"foo"` has higher precedence).
3769///
3770/// A string or array of strings indicating the name of custom styles to apply to the axis. A
3771/// style is a named collection of axis property defined within the [style
3772/// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
3773/// an array, later styles will override earlier styles.
3774///
3775/// __Default value:__ (none) __Note:__ Any specified style will augment the default style.
3776/// For example, an x-axis mark with `"style": "foo"` will use `config.axisX` and
3777/// `config.style.foo` (the specified style `"foo"` has higher precedence).
3778///
3779/// A [mark style property](https://vega.github.io/vega-lite/docs/config.html#style) to apply
3780/// to the title text mark.
3781///
3782/// __Default value:__ `"group-title"`.
3783///
3784/// Placeholder text if the `text` channel is not specified
3785///
3786/// The subtitle Text.
3787///
3788/// A string or array of strings indicating the name of custom styles to apply to the view
3789/// background. A style is a named collection of mark property defaults defined within the
3790/// [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If
3791/// style is an array, later styles will override earlier styles.
3792///
3793/// __Default value:__ `"cell"` __Note:__ Any specified view background properties will
3794/// augment the default style.
3795#[derive(Debug, Clone, Serialize, Deserialize)]
3796#[serde(untagged)]
3797#[derive(From)]
3798pub enum LegendText {
3799    String(String),
3800    StringArray(Vec<String>),
3801}
3802
3803#[derive(Debug, Clone, Serialize, Deserialize)]
3804#[serde(untagged)]
3805#[derive(From)]
3806pub enum TitleAnchorUnion {
3807    BackgroundExprRef(BackgroundExprRef),
3808    Enum(TitleAnchorEnum),
3809}
3810
3811#[derive(Debug, Clone, Serialize, Deserialize)]
3812#[serde(rename_all = "snake_case")]
3813pub enum TitleAnchorEnum {
3814    End,
3815    Middle,
3816    Start,
3817}
3818
3819#[derive(Debug, Clone, Serialize, Deserialize)]
3820#[serde(untagged)]
3821#[derive(From)]
3822pub enum TitleOrientUnion {
3823    BackgroundExprRef(BackgroundExprRef),
3824    Enum(Orient),
3825}
3826
3827/// The orientation of the header label. One of `"top"`, `"bottom"`, `"left"` or `"right"`.
3828///
3829/// Shortcut for setting both labelOrient and titleOrient.
3830///
3831/// The orientation of the header title. One of `"top"`, `"bottom"`, `"left"` or `"right"`.
3832///
3833/// Orientation of the legend title.
3834#[derive(Debug, Clone, Serialize, Deserialize)]
3835#[serde(rename_all = "snake_case")]
3836pub enum Orient {
3837    Bottom,
3838    Left,
3839    Right,
3840    Top,
3841}
3842
3843/// Explicitly set the visible axis tick values.
3844///
3845/// Explicitly set the visible legend values.
3846#[derive(Debug, Clone, Serialize, Deserialize)]
3847#[serde(untagged)]
3848#[derive(From)]
3849pub enum Values {
3850    BackgroundExprRef(BackgroundExprRef),
3851    UnionArray(Vec<UnionWith>),
3852}
3853
3854#[derive(Debug, Clone, Serialize, Deserialize)]
3855#[serde(rename_all = "camelCase")]
3856#[derive(Default, Builder)]
3857#[builder(setter(into, strip_option))]
3858pub struct Scale {
3859    /// The alignment of the steps within the scale range.
3860    ///
3861    /// This value must lie in the range `[0,1]`. A value of `0.5` indicates that the steps
3862    /// should be centered within the range. A value of `0` or `1` may be used to shift the bands
3863    /// to one side, say to position them adjacent to an axis.
3864    ///
3865    /// __Default value:__ `0.5`
3866    #[serde(skip_serializing_if = "Option::is_none")]
3867    #[builder(default)]
3868    pub align: Option<CornerRadiusUnion>,
3869    /// The logarithm base of the `log` scale (default `10`).
3870    #[serde(skip_serializing_if = "Option::is_none")]
3871    #[builder(default)]
3872    pub base: Option<CornerRadiusUnion>,
3873    /// Bin boundaries can be provided to scales as either an explicit array of bin boundaries or
3874    /// as a bin specification object. The legal values are:
3875    /// - An [array](../types/#Array) literal of bin boundary values. For example, `[0, 5, 10,
3876    /// 15, 20]`. The array must include both starting and ending boundaries. The previous
3877    /// example uses five values to indicate a total of four bin intervals: [0-5), [5-10),
3878    /// [10-15), [15-20]. Array literals may include signal references as elements.
3879    /// - A [bin specification object](https://vega.github.io/vega-lite/docs/scale.html#bins)
3880    /// that indicates the bin _step_ size, and optionally the _start_ and _stop_ boundaries.
3881    /// - An array of bin boundaries over the scale domain. If provided, axes and legends will
3882    /// use the bin boundaries to inform the choice of tick marks and text labels.
3883    #[serde(skip_serializing_if = "Option::is_none")]
3884    #[builder(default)]
3885    pub bins: Option<ScaleBins>,
3886    /// If `true`, values that exceed the data domain are clamped to either the minimum or
3887    /// maximum range value
3888    ///
3889    /// __Default value:__ derived from the [scale
3890    /// config](https://vega.github.io/vega-lite/docs/config.html#scale-config)'s `clamp` (`true`
3891    /// by default).
3892    #[serde(skip_serializing_if = "Option::is_none")]
3893    #[builder(default)]
3894    pub clamp: Option<Aria>,
3895    /// A constant determining the slope of the symlog function around zero. Only used for
3896    /// `symlog` scales.
3897    ///
3898    /// __Default value:__ `1`
3899    #[serde(skip_serializing_if = "Option::is_none")]
3900    #[builder(default)]
3901    pub constant: Option<CornerRadiusUnion>,
3902    /// Customized domain values in the form of constant values or dynamic values driven by a
3903    /// parameter.
3904    ///
3905    /// 1) Constant `domain` for _quantitative_ fields can take one of the following forms:
3906    ///
3907    /// - A two-element array with minimum and maximum values. To create a diverging scale, this
3908    /// two-element array can be combined with the `domainMid` property.
3909    /// - An array with more than two entries, for [Piecewise quantitative
3910    /// scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise).
3911    /// - A string value `"unaggregated"`, if the input field is aggregated, to indicate that the
3912    /// domain should include the raw data values prior to the aggregation.
3913    ///
3914    /// 2) Constant `domain` for _temporal_ fields can be a two-element array with minimum and
3915    /// maximum values, in the form of either timestamps or the [DateTime definition
3916    /// objects](https://vega.github.io/vega-lite/docs/types.html#datetime).
3917    ///
3918    /// 3) Constant `domain` for _ordinal_ and _nominal_ fields can be an array that lists valid
3919    /// input values.
3920    ///
3921    /// 4) To combine (union) specified constant domain with the field's values, `domain` can be
3922    /// an object with a `unionWith` property that specify constant domain to be combined. For
3923    /// example, `domain: {unionWith: [0, 100]}` for a quantitative scale means that the scale
3924    /// domain always includes `[0, 100]`, but will include other values in the fields beyond
3925    /// `[0, 100]`.
3926    ///
3927    /// 5) Domain can also takes an object defining a field or encoding of a parameter that
3928    /// [interactively
3929    /// determines](https://vega.github.io/vega-lite/docs/selection.html#scale-domains) the scale
3930    /// domain.
3931    #[serde(skip_serializing_if = "Option::is_none")]
3932    #[builder(default)]
3933    pub domain: Option<DomainUnion>,
3934    /// Sets the maximum value in the scale domain, overriding the `domain` property. This
3935    /// property is only intended for use with scales having continuous domains.
3936    #[serde(skip_serializing_if = "Option::is_none")]
3937    #[builder(default)]
3938    pub domain_max: Option<DomainM>,
3939    /// Inserts a single mid-point value into a two-element domain. The mid-point value must lie
3940    /// between the domain minimum and maximum values. This property can be useful for setting a
3941    /// midpoint for [diverging color
3942    /// scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). The domainMid
3943    /// property is only intended for use with scales supporting continuous, piecewise domains.
3944    #[serde(skip_serializing_if = "Option::is_none")]
3945    #[builder(default)]
3946    pub domain_mid: Option<CornerRadiusUnion>,
3947    /// Sets the minimum value in the scale domain, overriding the domain property. This property
3948    /// is only intended for use with scales having continuous domains.
3949    #[serde(skip_serializing_if = "Option::is_none")]
3950    #[builder(default)]
3951    pub domain_min: Option<DomainM>,
3952    /// An expression for an array of raw values that, if non-null, directly overrides the
3953    /// _domain_ property. This is useful for supporting interactions such as panning or zooming
3954    /// a scale. The scale may be initially determined using a data-driven domain, then modified
3955    /// in response to user input by setting the rawDomain value.
3956    #[serde(skip_serializing_if = "Option::is_none")]
3957    #[builder(default)]
3958    pub domain_raw: Option<BackgroundExprRef>,
3959    /// The exponent of the `pow` scale.
3960    #[serde(skip_serializing_if = "Option::is_none")]
3961    #[builder(default)]
3962    pub exponent: Option<CornerRadiusUnion>,
3963    /// The interpolation method for range values. By default, a general interpolator for
3964    /// numbers, dates, strings and colors (in HCL space) is used. For color ranges, this
3965    /// property allows interpolation in alternative color spaces. Legal values include `rgb`,
3966    /// `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long'
3967    /// variants use longer paths in polar coordinate spaces). If object-valued, this property
3968    /// accepts an object with a string-valued _type_ property and an optional numeric _gamma_
3969    /// property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate
3970    /// documentation](https://github.com/d3/d3-interpolate).
3971    ///
3972    /// * __Default value:__ `hcl`
3973    #[serde(skip_serializing_if = "Option::is_none")]
3974    #[builder(default)]
3975    pub interpolate: Option<ScaleInterpolate>,
3976    /// Extending the domain so that it starts and ends on nice round values. This method
3977    /// typically modifies the scale’s domain, and may only extend the bounds to the nearest
3978    /// round value. Nicing is useful if the domain is computed from data and may be irregular.
3979    /// For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2,
3980    /// 1.0]_.
3981    ///
3982    /// For quantitative scales such as linear, `nice` can be either a boolean flag or a number.
3983    /// If `nice` is a number, it will represent a desired tick count. This allows greater
3984    /// control over the step size used to extend the bounds, guaranteeing that the returned
3985    /// ticks will exactly cover the domain.
3986    ///
3987    /// For temporal fields with time and utc scales, the `nice` value can be a string indicating
3988    /// the desired time interval. Legal values are `"millisecond"`, `"second"`, `"minute"`,
3989    /// `"hour"`, `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, `time` and `utc`
3990    /// scales can accept an object-valued interval specifier of the form `{"interval": "month",
3991    /// "step": 3}`, which includes a desired number of interval steps. Here, the domain would
3992    /// snap to quarter (Jan, Apr, Jul, Oct) boundaries.
3993    ///
3994    /// __Default value:__ `true` for unbinned _quantitative_ fields without explicit domain
3995    /// bounds; `false` otherwise.
3996    #[serde(skip_serializing_if = "Option::is_none")]
3997    #[builder(default)]
3998    pub nice: Option<Nice>,
3999    /// For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales,
4000    /// expands the scale domain to accommodate the specified number of pixels on each of the
4001    /// scale range. The scale range must represent pixels for this parameter to function as
4002    /// intended. Padding adjustment is performed prior to all other adjustments, including the
4003    /// effects of the `zero`, `nice`, `domainMin`, and `domainMax` properties.
4004    ///
4005    /// For _[band](https://vega.github.io/vega-lite/docs/scale.html#band)_ scales, shortcut for
4006    /// setting `paddingInner` and `paddingOuter` to the same value.
4007    ///
4008    /// For _[point](https://vega.github.io/vega-lite/docs/scale.html#point)_ scales, alias for
4009    /// `paddingOuter`.
4010    ///
4011    /// __Default value:__ For _continuous_ scales, derived from the [scale
4012    /// config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `continuousPadding`.
4013    /// For _band and point_ scales, see `paddingInner` and `paddingOuter`. By default, Vega-Lite
4014    /// sets padding such that _width/height = number of unique values * step_.
4015    #[serde(skip_serializing_if = "Option::is_none")]
4016    #[builder(default)]
4017    pub padding: Option<CornerRadiusUnion>,
4018    /// The inner padding (spacing) within each band step of band scales, as a fraction of the
4019    /// step size. This value must lie in the range [0,1].
4020    ///
4021    /// For point scale, this property is invalid as point scales do not have internal band
4022    /// widths (only step sizes between bands).
4023    ///
4024    /// __Default value:__ derived from the [scale
4025    /// config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingInner`.
4026    #[serde(skip_serializing_if = "Option::is_none")]
4027    #[builder(default)]
4028    pub padding_inner: Option<CornerRadiusUnion>,
4029    /// The outer padding (spacing) at the ends of the range of band and point scales, as a
4030    /// fraction of the step size. This value must lie in the range [0,1].
4031    ///
4032    /// __Default value:__ derived from the [scale
4033    /// config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingOuter` for
4034    /// band scales and `pointPadding` for point scales. By default, Vega-Lite sets outer padding
4035    /// such that _width/height = number of unique values * step_.
4036    #[serde(skip_serializing_if = "Option::is_none")]
4037    #[builder(default)]
4038    pub padding_outer: Option<CornerRadiusUnion>,
4039    /// The range of the scale. One of:
4040    ///
4041    /// - A string indicating a [pre-defined named scale
4042    /// range](https://vega.github.io/vega-lite/docs/scale.html#range-config) (e.g., example,
4043    /// `"symbol"`, or `"diverging"`).
4044    ///
4045    /// - For [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous),
4046    /// two-element array indicating  minimum and maximum values, or an array with more than two
4047    /// entries for specifying a [piecewise
4048    /// scale](https://vega.github.io/vega-lite/docs/scale.html#piecewise).
4049    ///
4050    /// - For [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) and
4051    /// [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales, an
4052    /// array of desired output values or an object with a `field` property representing the
4053    /// range values.  For example, if a field `color` contains CSS color names, we can set
4054    /// `range` to `{field: "color"}`.
4055    ///
4056    /// __Notes:__
4057    ///
4058    /// 1) For color scales you can also specify a color
4059    /// [`scheme`](https://vega.github.io/vega-lite/docs/scale.html#scheme) instead of `range`.
4060    ///
4061    /// 2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be
4062    /// customized via the view's corresponding
4063    /// [size](https://vega.github.io/vega-lite/docs/size.html) (`width` and `height`).
4064    #[serde(skip_serializing_if = "Option::is_none")]
4065    #[builder(default)]
4066    pub range: Option<ScaleRange>,
4067    /// Sets the maximum value in the scale range, overriding the `range` property or the default
4068    /// range. This property is only intended for use with scales having continuous ranges.
4069    #[serde(skip_serializing_if = "Option::is_none")]
4070    #[builder(default)]
4071    pub range_max: Option<RangeM>,
4072    /// Sets the minimum value in the scale range, overriding the `range` property or the default
4073    /// range. This property is only intended for use with scales having continuous ranges.
4074    #[serde(skip_serializing_if = "Option::is_none")]
4075    #[builder(default)]
4076    pub range_min: Option<RangeM>,
4077    /// If true, reverses the order of the scale range. __Default value:__ `false`.
4078    #[serde(skip_serializing_if = "Option::is_none")]
4079    #[builder(default)]
4080    pub reverse: Option<Aria>,
4081    /// If `true`, rounds numeric output values to integers. This can be helpful for snapping to
4082    /// the pixel grid.
4083    ///
4084    /// __Default value:__ `false`.
4085    #[serde(skip_serializing_if = "Option::is_none")]
4086    #[builder(default)]
4087    pub round: Option<Aria>,
4088    /// A string indicating a color
4089    /// [scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme) name (e.g.,
4090    /// `"category10"` or `"blues"`) or a [scheme parameter
4091    /// object](https://vega.github.io/vega-lite/docs/scale.html#scheme-params).
4092    ///
4093    /// Discrete color schemes may be used with
4094    /// [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) or
4095    /// [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales.
4096    /// Continuous color schemes are intended for use with color scales.
4097    ///
4098    /// To set a custom scheme, instead set the list of values [as the scale
4099    /// range](https://vega.github.io/vega-lite/docs/scale.html#2-setting-the-range-property-to-an-array-of-valid-css-color-strings).
4100    ///
4101    /// For the full list of supported schemes, please refer to the [Vega
4102    /// Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.
4103    #[serde(skip_serializing_if = "Option::is_none")]
4104    #[builder(default)]
4105    pub scheme: Option<SchemeUnion>,
4106    /// The type of scale. Vega-Lite supports the following categories of scale types:
4107    ///
4108    /// 1) [**Continuous Scales**](https://vega.github.io/vega-lite/docs/scale.html#continuous)
4109    /// -- mapping continuous domains to continuous output ranges
4110    /// ([`"linear"`](https://vega.github.io/vega-lite/docs/scale.html#linear),
4111    /// [`"pow"`](https://vega.github.io/vega-lite/docs/scale.html#pow),
4112    /// [`"sqrt"`](https://vega.github.io/vega-lite/docs/scale.html#sqrt),
4113    /// [`"symlog"`](https://vega.github.io/vega-lite/docs/scale.html#symlog),
4114    /// [`"log"`](https://vega.github.io/vega-lite/docs/scale.html#log),
4115    /// [`"time"`](https://vega.github.io/vega-lite/docs/scale.html#time),
4116    /// [`"utc"`](https://vega.github.io/vega-lite/docs/scale.html#utc).
4117    ///
4118    /// 2) [**Discrete Scales**](https://vega.github.io/vega-lite/docs/scale.html#discrete) --
4119    /// mapping discrete domains to discrete
4120    /// ([`"ordinal"`](https://vega.github.io/vega-lite/docs/scale.html#ordinal)) or continuous
4121    /// ([`"band"`](https://vega.github.io/vega-lite/docs/scale.html#band) and
4122    /// [`"point"`](https://vega.github.io/vega-lite/docs/scale.html#point)) output ranges.
4123    ///
4124    /// 3) [**Discretizing
4125    /// Scales**](https://vega.github.io/vega-lite/docs/scale.html#discretizing) -- mapping
4126    /// continuous domains to discrete output ranges
4127    /// [`"bin-ordinal"`](https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal),
4128    /// [`"quantile"`](https://vega.github.io/vega-lite/docs/scale.html#quantile),
4129    /// [`"quantize"`](https://vega.github.io/vega-lite/docs/scale.html#quantize) and
4130    /// [`"threshold"`](https://vega.github.io/vega-lite/docs/scale.html#threshold).
4131    ///
4132    /// __Default value:__ please see the [scale type
4133    /// table](https://vega.github.io/vega-lite/docs/scale.html#type).
4134    #[serde(rename = "type")]
4135    #[serde(skip_serializing_if = "Option::is_none")]
4136    #[builder(default)]
4137    pub scale_type: Option<ScaleType>,
4138    /// If `true`, ensures that a zero baseline value is included in the scale domain.
4139    ///
4140    /// __Default value:__ `true` for x and y channels if the quantitative field is not binned
4141    /// and no custom `domain` is provided; `false` otherwise.
4142    ///
4143    /// __Note:__ Log, time, and utc scales do not support `zero`.
4144    #[serde(skip_serializing_if = "Option::is_none")]
4145    #[builder(default)]
4146    pub zero: Option<Aria>,
4147}
4148
4149/// Bin boundaries can be provided to scales as either an explicit array of bin boundaries or
4150/// as a bin specification object. The legal values are:
4151/// - An [array](../types/#Array) literal of bin boundary values. For example, `[0, 5, 10,
4152/// 15, 20]`. The array must include both starting and ending boundaries. The previous
4153/// example uses five values to indicate a total of four bin intervals: [0-5), [5-10),
4154/// [10-15), [15-20]. Array literals may include signal references as elements.
4155/// - A [bin specification object](https://vega.github.io/vega-lite/docs/scale.html#bins)
4156/// that indicates the bin _step_ size, and optionally the _start_ and _stop_ boundaries.
4157/// - An array of bin boundaries over the scale domain. If provided, axes and legends will
4158/// use the bin boundaries to inform the choice of tick marks and text labels.
4159#[derive(Debug, Clone, Serialize, Deserialize)]
4160#[serde(untagged)]
4161#[derive(From)]
4162pub enum ScaleBins {
4163    DoubleArray(Vec<f64>),
4164    ScaleBinParams(ScaleBinParams),
4165}
4166
4167#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
4168#[builder(setter(into, strip_option))]
4169pub struct ScaleBinParams {
4170    /// The starting (lowest-valued) bin boundary.
4171    ///
4172    /// __Default value:__ The lowest value of the scale domain will be used.
4173    #[serde(skip_serializing_if = "Option::is_none")]
4174    #[builder(default)]
4175    pub start: Option<f64>,
4176    /// The step size defining the bin interval width.
4177    #[serde(skip_serializing_if = "Option::is_none")]
4178    #[builder(default)]
4179    pub step: Option<f64>,
4180    /// The stopping (highest-valued) bin boundary.
4181    ///
4182    /// __Default value:__ The highest value of the scale domain will be used.
4183    #[serde(skip_serializing_if = "Option::is_none")]
4184    #[builder(default)]
4185    pub stop: Option<f64>,
4186}
4187
4188/// Customized domain values in the form of constant values or dynamic values driven by a
4189/// parameter.
4190///
4191/// 1) Constant `domain` for _quantitative_ fields can take one of the following forms:
4192///
4193/// - A two-element array with minimum and maximum values. To create a diverging scale, this
4194/// two-element array can be combined with the `domainMid` property.
4195/// - An array with more than two entries, for [Piecewise quantitative
4196/// scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise).
4197/// - A string value `"unaggregated"`, if the input field is aggregated, to indicate that the
4198/// domain should include the raw data values prior to the aggregation.
4199///
4200/// 2) Constant `domain` for _temporal_ fields can be a two-element array with minimum and
4201/// maximum values, in the form of either timestamps or the [DateTime definition
4202/// objects](https://vega.github.io/vega-lite/docs/types.html#datetime).
4203///
4204/// 3) Constant `domain` for _ordinal_ and _nominal_ fields can be an array that lists valid
4205/// input values.
4206///
4207/// 4) To combine (union) specified constant domain with the field's values, `domain` can be
4208/// an object with a `unionWith` property that specify constant domain to be combined. For
4209/// example, `domain: {unionWith: [0, 100]}` for a quantitative scale means that the scale
4210/// domain always includes `[0, 100]`, but will include other values in the fields beyond
4211/// `[0, 100]`.
4212///
4213/// 5) Domain can also takes an object defining a field or encoding of a parameter that
4214/// [interactively
4215/// determines](https://vega.github.io/vega-lite/docs/selection.html#scale-domains) the scale
4216/// domain.
4217#[derive(Debug, Clone, Serialize, Deserialize)]
4218#[serde(untagged)]
4219#[derive(From)]
4220pub enum DomainUnion {
4221    DomainUnionWith(DomainUnionWith),
4222    Enum(DomainEnum),
4223    UnionArray(Vec<Option<DomainElement>>),
4224}
4225
4226#[derive(Debug, Clone, Serialize, Deserialize)]
4227#[serde(untagged)]
4228#[derive(From)]
4229pub enum DomainElement {
4230    Bool(bool),
4231    DomainDateTime(DomainDateTime),
4232    Double(f64),
4233    String(String),
4234}
4235
4236/// Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
4237/// month has higher precedence. `day` cannot be combined with other date. We accept string
4238/// for month and day names.
4239///
4240/// An expression for an array of raw values that, if non-null, directly overrides the
4241/// _domain_ property. This is useful for supporting interactions such as panning or zooming
4242/// a scale. The scale may be initially determined using a data-driven domain, then modified
4243/// in response to user input by setting the rawDomain value.
4244#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
4245#[builder(setter(into, strip_option))]
4246pub struct DomainDateTime {
4247    /// Integer value representing the date (day of the month) from 1-31.
4248    #[serde(skip_serializing_if = "Option::is_none")]
4249    #[builder(default)]
4250    pub date: Option<f64>,
4251    /// Value representing the day of a week. This can be one of: (1) integer value -- `1`
4252    /// represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
4253    /// case-insensitive, 3-character short day name (e.g., `"Mon"`).
4254    ///
4255    /// **Warning:** A DateTime definition object with `day`** should not be combined with
4256    /// `year`, `quarter`, `month`, or `date`.
4257    #[serde(skip_serializing_if = "Option::is_none")]
4258    #[builder(default)]
4259    pub day: Option<DayUnion>,
4260    /// Integer value representing the hour of a day from 0-23.
4261    #[serde(skip_serializing_if = "Option::is_none")]
4262    #[builder(default)]
4263    pub hours: Option<f64>,
4264    /// Integer value representing the millisecond segment of time.
4265    #[serde(skip_serializing_if = "Option::is_none")]
4266    #[builder(default)]
4267    pub milliseconds: Option<f64>,
4268    /// Integer value representing the minute segment of time from 0-59.
4269    #[serde(skip_serializing_if = "Option::is_none")]
4270    #[builder(default)]
4271    pub minutes: Option<f64>,
4272    /// One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
4273    /// (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
4274    /// short month name (e.g., `"Jan"`).
4275    #[serde(skip_serializing_if = "Option::is_none")]
4276    #[builder(default)]
4277    pub month: Option<Month>,
4278    /// Integer value representing the quarter of the year (from 1-4).
4279    #[serde(skip_serializing_if = "Option::is_none")]
4280    #[builder(default)]
4281    pub quarter: Option<f64>,
4282    /// Integer value representing the second segment (0-59) of a time value
4283    #[serde(skip_serializing_if = "Option::is_none")]
4284    #[builder(default)]
4285    pub seconds: Option<f64>,
4286    /// A boolean flag indicating if date time is in utc time. If false, the date time is in
4287    /// local time
4288    #[serde(skip_serializing_if = "Option::is_none")]
4289    #[builder(default)]
4290    pub utc: Option<bool>,
4291    /// Integer value representing the year.
4292    #[serde(skip_serializing_if = "Option::is_none")]
4293    #[builder(default)]
4294    pub year: Option<f64>,
4295    /// Vega expression (which can refer to Vega-Lite parameters).
4296    #[serde(skip_serializing_if = "Option::is_none")]
4297    #[builder(default)]
4298    pub expr: Option<String>,
4299}
4300
4301/// An expression for an array of raw values that, if non-null, directly overrides the
4302/// _domain_ property. This is useful for supporting interactions such as panning or zooming
4303/// a scale. The scale may be initially determined using a data-driven domain, then modified
4304/// in response to user input by setting the rawDomain value.
4305#[derive(Debug, Clone, Serialize, Deserialize)]
4306#[serde(rename_all = "camelCase")]
4307#[derive(Default, Builder)]
4308#[builder(setter(into, strip_option))]
4309pub struct DomainUnionWith {
4310    /// If a selection parameter is specified, the field name to extract selected values for when
4311    /// the selection is
4312    /// [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple
4313    /// fields or encodings.
4314    #[serde(skip_serializing_if = "Option::is_none")]
4315    #[builder(default)]
4316    pub field: Option<String>,
4317    /// The name of a parameter.
4318    #[serde(skip_serializing_if = "Option::is_none")]
4319    #[builder(default)]
4320    pub param: Option<String>,
4321    /// If a selection parameter is specified, the encoding channel to extract selected values
4322    /// for when a selection is
4323    /// [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple
4324    /// fields or encodings.
4325    #[serde(skip_serializing_if = "Option::is_none")]
4326    #[builder(default)]
4327    pub encoding: Option<SingleDefUnitChannel>,
4328    /// Customized domain values to be union with the field's values or explicitly defined
4329    /// domain. Should be an array of valid scale domain values.
4330    #[serde(skip_serializing_if = "Option::is_none")]
4331    #[builder(default)]
4332    pub union_with: Option<Vec<UnionWith>>,
4333    /// Vega expression (which can refer to Vega-Lite parameters).
4334    #[serde(skip_serializing_if = "Option::is_none")]
4335    #[builder(default)]
4336    pub expr: Option<String>,
4337}
4338
4339#[derive(Debug, Clone, Serialize, Deserialize)]
4340#[serde(rename_all = "snake_case")]
4341pub enum DomainEnum {
4342    Unaggregated,
4343}
4344
4345#[derive(Debug, Clone, Serialize, Deserialize)]
4346#[serde(untagged)]
4347#[derive(From)]
4348pub enum DomainM {
4349    DomainMaxDateTime(DomainMaxDateTime),
4350    Double(f64),
4351}
4352
4353/// Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
4354/// month has higher precedence. `day` cannot be combined with other date. We accept string
4355/// for month and day names.
4356///
4357/// An expression for an array of raw values that, if non-null, directly overrides the
4358/// _domain_ property. This is useful for supporting interactions such as panning or zooming
4359/// a scale. The scale may be initially determined using a data-driven domain, then modified
4360/// in response to user input by setting the rawDomain value.
4361#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
4362#[builder(setter(into, strip_option))]
4363pub struct DomainMaxDateTime {
4364    /// Integer value representing the date (day of the month) from 1-31.
4365    #[serde(skip_serializing_if = "Option::is_none")]
4366    #[builder(default)]
4367    pub date: Option<f64>,
4368    /// Value representing the day of a week. This can be one of: (1) integer value -- `1`
4369    /// represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3)
4370    /// case-insensitive, 3-character short day name (e.g., `"Mon"`).
4371    ///
4372    /// **Warning:** A DateTime definition object with `day`** should not be combined with
4373    /// `year`, `quarter`, `month`, or `date`.
4374    #[serde(skip_serializing_if = "Option::is_none")]
4375    #[builder(default)]
4376    pub day: Option<DayUnion>,
4377    /// Integer value representing the hour of a day from 0-23.
4378    #[serde(skip_serializing_if = "Option::is_none")]
4379    #[builder(default)]
4380    pub hours: Option<f64>,
4381    /// Integer value representing the millisecond segment of time.
4382    #[serde(skip_serializing_if = "Option::is_none")]
4383    #[builder(default)]
4384    pub milliseconds: Option<f64>,
4385    /// Integer value representing the minute segment of time from 0-59.
4386    #[serde(skip_serializing_if = "Option::is_none")]
4387    #[builder(default)]
4388    pub minutes: Option<f64>,
4389    /// One of: (1) integer value representing the month from `1`-`12`. `1` represents January;
4390    /// (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character
4391    /// short month name (e.g., `"Jan"`).
4392    #[serde(skip_serializing_if = "Option::is_none")]
4393    #[builder(default)]
4394    pub month: Option<Month>,
4395    /// Integer value representing the quarter of the year (from 1-4).
4396    #[serde(skip_serializing_if = "Option::is_none")]
4397    #[builder(default)]
4398    pub quarter: Option<f64>,
4399    /// Integer value representing the second segment (0-59) of a time value
4400    #[serde(skip_serializing_if = "Option::is_none")]
4401    #[builder(default)]
4402    pub seconds: Option<f64>,
4403    /// A boolean flag indicating if date time is in utc time. If false, the date time is in
4404    /// local time
4405    #[serde(skip_serializing_if = "Option::is_none")]
4406    #[builder(default)]
4407    pub utc: Option<bool>,
4408    /// Integer value representing the year.
4409    #[serde(skip_serializing_if = "Option::is_none")]
4410    #[builder(default)]
4411    pub year: Option<f64>,
4412    /// Vega expression (which can refer to Vega-Lite parameters).
4413    #[serde(skip_serializing_if = "Option::is_none")]
4414    #[builder(default)]
4415    pub expr: Option<String>,
4416}
4417
4418/// The interpolation method for range values. By default, a general interpolator for
4419/// numbers, dates, strings and colors (in HCL space) is used. For color ranges, this
4420/// property allows interpolation in alternative color spaces. Legal values include `rgb`,
4421/// `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long'
4422/// variants use longer paths in polar coordinate spaces). If object-valued, this property
4423/// accepts an object with a string-valued _type_ property and an optional numeric _gamma_
4424/// property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate
4425/// documentation](https://github.com/d3/d3-interpolate).
4426///
4427/// * __Default value:__ `hcl`
4428#[derive(Debug, Clone, Serialize, Deserialize)]
4429#[serde(untagged)]
4430#[derive(From)]
4431pub enum ScaleInterpolate {
4432    Enum(ScaleInterpolateEnum),
4433    ScaleInterpolateParamsClass(ScaleInterpolateParamsClass),
4434}
4435
4436/// An expression for an array of raw values that, if non-null, directly overrides the
4437/// _domain_ property. This is useful for supporting interactions such as panning or zooming
4438/// a scale. The scale may be initially determined using a data-driven domain, then modified
4439/// in response to user input by setting the rawDomain value.
4440#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
4441#[builder(setter(into, strip_option))]
4442pub struct ScaleInterpolateParamsClass {
4443    /// Vega expression (which can refer to Vega-Lite parameters).
4444    #[serde(skip_serializing_if = "Option::is_none")]
4445    #[builder(default)]
4446    pub expr: Option<String>,
4447    #[serde(skip_serializing_if = "Option::is_none")]
4448    #[builder(default)]
4449    pub gamma: Option<f64>,
4450    #[serde(rename = "type")]
4451    #[serde(skip_serializing_if = "Option::is_none")]
4452    #[builder(default)]
4453    pub expr_ref_type: Option<ScaleInterpolateParamsType>,
4454}
4455
4456#[derive(Debug, Clone, Serialize, Deserialize)]
4457#[serde(rename_all = "kebab-case")]
4458pub enum ScaleInterpolateParamsType {
4459    Cubehelix,
4460    #[serde(rename = "cubehelix-long")]
4461    CubehelixLong,
4462    Rgb,
4463}
4464
4465#[derive(Debug, Clone, Serialize, Deserialize)]
4466#[serde(rename_all = "kebab-case")]
4467pub enum ScaleInterpolateEnum {
4468    Cubehelix,
4469    #[serde(rename = "cubehelix-long")]
4470    CubehelixLong,
4471    Hcl,
4472    #[serde(rename = "hcl-long")]
4473    HclLong,
4474    Hsl,
4475    #[serde(rename = "hsl-long")]
4476    HslLong,
4477    Lab,
4478    Rgb,
4479}
4480
4481/// Extending the domain so that it starts and ends on nice round values. This method
4482/// typically modifies the scale’s domain, and may only extend the bounds to the nearest
4483/// round value. Nicing is useful if the domain is computed from data and may be irregular.
4484/// For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2,
4485/// 1.0]_.
4486///
4487/// For quantitative scales such as linear, `nice` can be either a boolean flag or a number.
4488/// If `nice` is a number, it will represent a desired tick count. This allows greater
4489/// control over the step size used to extend the bounds, guaranteeing that the returned
4490/// ticks will exactly cover the domain.
4491///
4492/// For temporal fields with time and utc scales, the `nice` value can be a string indicating
4493/// the desired time interval. Legal values are `"millisecond"`, `"second"`, `"minute"`,
4494/// `"hour"`, `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, `time` and `utc`
4495/// scales can accept an object-valued interval specifier of the form `{"interval": "month",
4496/// "step": 3}`, which includes a desired number of interval steps. Here, the domain would
4497/// snap to quarter (Jan, Apr, Jul, Oct) boundaries.
4498///
4499/// __Default value:__ `true` for unbinned _quantitative_ fields without explicit domain
4500/// bounds; `false` otherwise.
4501#[derive(Debug, Clone, Serialize, Deserialize)]
4502#[serde(untagged)]
4503#[derive(From)]
4504pub enum Nice {
4505    Bool(bool),
4506    Double(f64),
4507    Enum(TimeInterval),
4508    NiceTimeIntervalStep(NiceTimeIntervalStep),
4509}
4510
4511/// An expression for an array of raw values that, if non-null, directly overrides the
4512/// _domain_ property. This is useful for supporting interactions such as panning or zooming
4513/// a scale. The scale may be initially determined using a data-driven domain, then modified
4514/// in response to user input by setting the rawDomain value.
4515#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
4516#[builder(setter(into, strip_option))]
4517pub struct NiceTimeIntervalStep {
4518    #[serde(skip_serializing_if = "Option::is_none")]
4519    #[builder(default)]
4520    pub interval: Option<TimeInterval>,
4521    #[serde(skip_serializing_if = "Option::is_none")]
4522    #[builder(default)]
4523    pub step: Option<f64>,
4524    /// Vega expression (which can refer to Vega-Lite parameters).
4525    #[serde(skip_serializing_if = "Option::is_none")]
4526    #[builder(default)]
4527    pub expr: Option<String>,
4528}
4529
4530/// The range of the scale. One of:
4531///
4532/// - A string indicating a [pre-defined named scale
4533/// range](https://vega.github.io/vega-lite/docs/scale.html#range-config) (e.g., example,
4534/// `"symbol"`, or `"diverging"`).
4535///
4536/// - For [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous),
4537/// two-element array indicating  minimum and maximum values, or an array with more than two
4538/// entries for specifying a [piecewise
4539/// scale](https://vega.github.io/vega-lite/docs/scale.html#piecewise).
4540///
4541/// - For [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) and
4542/// [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales, an
4543/// array of desired output values or an object with a `field` property representing the
4544/// range values.  For example, if a field `color` contains CSS color names, we can set
4545/// `range` to `{field: "color"}`.
4546///
4547/// __Notes:__
4548///
4549/// 1) For color scales you can also specify a color
4550/// [`scheme`](https://vega.github.io/vega-lite/docs/scale.html#scheme) instead of `range`.
4551///
4552/// 2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be
4553/// customized via the view's corresponding
4554/// [size](https://vega.github.io/vega-lite/docs/size.html) (`width` and `height`).
4555#[derive(Debug, Clone, Serialize, Deserialize)]
4556#[serde(untagged)]
4557#[derive(From)]
4558pub enum ScaleRange {
4559    Enum(RangeEnum),
4560    FieldRange(FieldRange),
4561    UnionArray(Vec<FluffyRange>),
4562}
4563
4564#[derive(Debug, Clone, Serialize, Deserialize)]
4565#[serde(untagged)]
4566#[derive(From)]
4567pub enum FluffyRange {
4568    BackgroundExprRef(BackgroundExprRef),
4569    Double(f64),
4570    DoubleArray(Vec<f64>),
4571    String(String),
4572}
4573
4574#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
4575#[builder(setter(into, strip_option))]
4576pub struct FieldRange {
4577    #[serde(skip_serializing_if = "Option::is_none")]
4578    #[builder(default)]
4579    pub field: Option<String>,
4580}
4581
4582#[derive(Debug, Clone, Serialize, Deserialize)]
4583#[serde(rename_all = "snake_case")]
4584pub enum RangeEnum {
4585    Category,
4586    Diverging,
4587    Heatmap,
4588    Height,
4589    Ordinal,
4590    Ramp,
4591    Symbol,
4592    Width,
4593}
4594
4595#[derive(Debug, Clone, Serialize, Deserialize)]
4596#[serde(untagged)]
4597#[derive(From)]
4598pub enum RangeM {
4599    BackgroundExprRef(BackgroundExprRef),
4600    Double(f64),
4601    String(String),
4602}
4603
4604/// The type of scale. Vega-Lite supports the following categories of scale types:
4605///
4606/// 1) [**Continuous Scales**](https://vega.github.io/vega-lite/docs/scale.html#continuous)
4607/// -- mapping continuous domains to continuous output ranges
4608/// ([`"linear"`](https://vega.github.io/vega-lite/docs/scale.html#linear),
4609/// [`"pow"`](https://vega.github.io/vega-lite/docs/scale.html#pow),
4610/// [`"sqrt"`](https://vega.github.io/vega-lite/docs/scale.html#sqrt),
4611/// [`"symlog"`](https://vega.github.io/vega-lite/docs/scale.html#symlog),
4612/// [`"log"`](https://vega.github.io/vega-lite/docs/scale.html#log),
4613/// [`"time"`](https://vega.github.io/vega-lite/docs/scale.html#time),
4614/// [`"utc"`](https://vega.github.io/vega-lite/docs/scale.html#utc).
4615///
4616/// 2) [**Discrete Scales**](https://vega.github.io/vega-lite/docs/scale.html#discrete) --
4617/// mapping discrete domains to discrete
4618/// ([`"ordinal"`](https://vega.github.io/vega-lite/docs/scale.html#ordinal)) or continuous
4619/// ([`"band"`](https://vega.github.io/vega-lite/docs/scale.html#band) and
4620/// [`"point"`](https://vega.github.io/vega-lite/docs/scale.html#point)) output ranges.
4621///
4622/// 3) [**Discretizing
4623/// Scales**](https://vega.github.io/vega-lite/docs/scale.html#discretizing) -- mapping
4624/// continuous domains to discrete output ranges
4625/// [`"bin-ordinal"`](https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal),
4626/// [`"quantile"`](https://vega.github.io/vega-lite/docs/scale.html#quantile),
4627/// [`"quantize"`](https://vega.github.io/vega-lite/docs/scale.html#quantize) and
4628/// [`"threshold"`](https://vega.github.io/vega-lite/docs/scale.html#threshold).
4629///
4630/// __Default value:__ please see the [scale type
4631/// table](https://vega.github.io/vega-lite/docs/scale.html#type).
4632#[derive(Debug, Clone, Serialize, Deserialize)]
4633#[serde(rename_all = "kebab-case")]
4634pub enum ScaleType {
4635    Band,
4636    #[serde(rename = "bin-ordinal")]
4637    BinOrdinal,
4638    Identity,
4639    Linear,
4640    Log,
4641    Ordinal,
4642    Point,
4643    Pow,
4644    Quantile,
4645    Quantize,
4646    Sequential,
4647    Sqrt,
4648    Symlog,
4649    Threshold,
4650    Time,
4651    Utc,
4652}
4653
4654/// A string indicating a color
4655/// [scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme) name (e.g.,
4656/// `"category10"` or `"blues"`) or a [scheme parameter
4657/// object](https://vega.github.io/vega-lite/docs/scale.html#scheme-params).
4658///
4659/// Discrete color schemes may be used with
4660/// [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) or
4661/// [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales.
4662/// Continuous color schemes are intended for use with color scales.
4663///
4664/// To set a custom scheme, instead set the list of values [as the scale
4665/// range](https://vega.github.io/vega-lite/docs/scale.html#2-setting-the-range-property-to-an-array-of-valid-css-color-strings).
4666///
4667/// For the full list of supported schemes, please refer to the [Vega
4668/// Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.
4669#[derive(Debug, Clone, Serialize, Deserialize)]
4670#[serde(untagged)]
4671#[derive(From)]
4672pub enum SchemeUnion {
4673    Enum(ColorScheme),
4674    SchemeParams(SchemeParams),
4675}
4676
4677/// An expression for an array of raw values that, if non-null, directly overrides the
4678/// _domain_ property. This is useful for supporting interactions such as panning or zooming
4679/// a scale. The scale may be initially determined using a data-driven domain, then modified
4680/// in response to user input by setting the rawDomain value.
4681#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
4682#[builder(setter(into, strip_option))]
4683pub struct SchemeParams {
4684    /// The number of colors to use in the scheme. This can be useful for scale types such as
4685    /// `"quantize"`, which use the length of the scale range to determine the number of discrete
4686    /// bins for the scale domain.
4687    #[serde(skip_serializing_if = "Option::is_none")]
4688    #[builder(default)]
4689    pub count: Option<f64>,
4690    /// The extent of the color range to use. For example `[0.2, 1]` will rescale the color
4691    /// scheme such that color values in the range _[0, 0.2)_ are excluded from the scheme.
4692    #[serde(skip_serializing_if = "Option::is_none")]
4693    #[builder(default)]
4694    pub extent: Option<Vec<f64>>,
4695    /// A color scheme name for ordinal scales (e.g., `"category10"` or `"blues"`).
4696    ///
4697    /// For the full list of supported schemes, please refer to the [Vega
4698    /// Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.
4699    #[serde(skip_serializing_if = "Option::is_none")]
4700    #[builder(default)]
4701    pub name: Option<ColorScheme>,
4702    /// Vega expression (which can refer to Vega-Lite parameters).
4703    #[serde(skip_serializing_if = "Option::is_none")]
4704    #[builder(default)]
4705    pub expr: Option<String>,
4706}
4707
4708/// A color scheme name for ordinal scales (e.g., `"category10"` or `"blues"`).
4709///
4710/// For the full list of supported schemes, please refer to the [Vega
4711/// Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.
4712#[derive(Debug, Clone, Serialize, Deserialize)]
4713#[serde(rename_all = "kebab-case")]
4714pub enum ColorScheme {
4715    Accent,
4716    Bluegreen,
4717    #[serde(rename = "bluegreen-3")]
4718    Bluegreen3,
4719    #[serde(rename = "bluegreen-4")]
4720    Bluegreen4,
4721    #[serde(rename = "bluegreen-5")]
4722    Bluegreen5,
4723    #[serde(rename = "bluegreen-6")]
4724    Bluegreen6,
4725    #[serde(rename = "bluegreen-7")]
4726    Bluegreen7,
4727    #[serde(rename = "bluegreen-8")]
4728    Bluegreen8,
4729    #[serde(rename = "bluegreen-9")]
4730    Bluegreen9,
4731    Blueorange,
4732    #[serde(rename = "blueorange-10")]
4733    Blueorange10,
4734    #[serde(rename = "blueorange-11")]
4735    Blueorange11,
4736    #[serde(rename = "blueorange-3")]
4737    Blueorange3,
4738    #[serde(rename = "blueorange-4")]
4739    Blueorange4,
4740    #[serde(rename = "blueorange-5")]
4741    Blueorange5,
4742    #[serde(rename = "blueorange-6")]
4743    Blueorange6,
4744    #[serde(rename = "blueorange-7")]
4745    Blueorange7,
4746    #[serde(rename = "blueorange-8")]
4747    Blueorange8,
4748    #[serde(rename = "blueorange-9")]
4749    Blueorange9,
4750    Bluepurple,
4751    #[serde(rename = "bluepurple-3")]
4752    Bluepurple3,
4753    #[serde(rename = "bluepurple-4")]
4754    Bluepurple4,
4755    #[serde(rename = "bluepurple-5")]
4756    Bluepurple5,
4757    #[serde(rename = "bluepurple-6")]
4758    Bluepurple6,
4759    #[serde(rename = "bluepurple-7")]
4760    Bluepurple7,
4761    #[serde(rename = "bluepurple-8")]
4762    Bluepurple8,
4763    #[serde(rename = "bluepurple-9")]
4764    Bluepurple9,
4765    Blues,
4766    Brownbluegreen,
4767    #[serde(rename = "brownbluegreen-10")]
4768    Brownbluegreen10,
4769    #[serde(rename = "brownbluegreen-11")]
4770    Brownbluegreen11,
4771    #[serde(rename = "brownbluegreen-3")]
4772    Brownbluegreen3,
4773    #[serde(rename = "brownbluegreen-4")]
4774    Brownbluegreen4,
4775    #[serde(rename = "brownbluegreen-5")]
4776    Brownbluegreen5,
4777    #[serde(rename = "brownbluegreen-6")]
4778    Brownbluegreen6,
4779    #[serde(rename = "brownbluegreen-7")]
4780    Brownbluegreen7,
4781    #[serde(rename = "brownbluegreen-8")]
4782    Brownbluegreen8,
4783    #[serde(rename = "brownbluegreen-9")]
4784    Brownbluegreen9,
4785    Browns,
4786    Category10,
4787    Category20,
4788    Category20B,
4789    Category20C,
4790    Cividis,
4791    Dark2,
4792    Darkblue,
4793    #[serde(rename = "darkblue-3")]
4794    Darkblue3,
4795    #[serde(rename = "darkblue-4")]
4796    Darkblue4,
4797    #[serde(rename = "darkblue-5")]
4798    Darkblue5,
4799    #[serde(rename = "darkblue-6")]
4800    Darkblue6,
4801    #[serde(rename = "darkblue-7")]
4802    Darkblue7,
4803    #[serde(rename = "darkblue-8")]
4804    Darkblue8,
4805    #[serde(rename = "darkblue-9")]
4806    Darkblue9,
4807    Darkgold,
4808    #[serde(rename = "darkgold-3")]
4809    Darkgold3,
4810    #[serde(rename = "darkgold-4")]
4811    Darkgold4,
4812    #[serde(rename = "darkgold-5")]
4813    Darkgold5,
4814    #[serde(rename = "darkgold-6")]
4815    Darkgold6,
4816    #[serde(rename = "darkgold-7")]
4817    Darkgold7,
4818    #[serde(rename = "darkgold-8")]
4819    Darkgold8,
4820    #[serde(rename = "darkgold-9")]
4821    Darkgold9,
4822    Darkgreen,
4823    #[serde(rename = "darkgreen-3")]
4824    Darkgreen3,
4825    #[serde(rename = "darkgreen-4")]
4826    Darkgreen4,
4827    #[serde(rename = "darkgreen-5")]
4828    Darkgreen5,
4829    #[serde(rename = "darkgreen-6")]
4830    Darkgreen6,
4831    #[serde(rename = "darkgreen-7")]
4832    Darkgreen7,
4833    #[serde(rename = "darkgreen-8")]
4834    Darkgreen8,
4835    #[serde(rename = "darkgreen-9")]
4836    Darkgreen9,
4837    Darkmulti,
4838    #[serde(rename = "darkmulti-3")]
4839    Darkmulti3,
4840    #[serde(rename = "darkmulti-4")]
4841    Darkmulti4,
4842    #[serde(rename = "darkmulti-5")]
4843    Darkmulti5,
4844    #[serde(rename = "darkmulti-6")]
4845    Darkmulti6,
4846    #[serde(rename = "darkmulti-7")]
4847    Darkmulti7,
4848    #[serde(rename = "darkmulti-8")]
4849    Darkmulti8,
4850    #[serde(rename = "darkmulti-9")]
4851    Darkmulti9,
4852    Darkred,
4853    #[serde(rename = "darkred-3")]
4854    Darkred3,
4855    #[serde(rename = "darkred-4")]
4856    Darkred4,
4857    #[serde(rename = "darkred-5")]
4858    Darkred5,
4859    #[serde(rename = "darkred-6")]
4860    Darkred6,
4861    #[serde(rename = "darkred-7")]
4862    Darkred7,
4863    #[serde(rename = "darkred-8")]
4864    Darkred8,
4865    #[serde(rename = "darkred-9")]
4866    Darkred9,
4867    Goldgreen,
4868    #[serde(rename = "goldgreen-3")]
4869    Goldgreen3,
4870    #[serde(rename = "goldgreen-4")]
4871    Goldgreen4,
4872    #[serde(rename = "goldgreen-5")]
4873    Goldgreen5,
4874    #[serde(rename = "goldgreen-6")]
4875    Goldgreen6,
4876    #[serde(rename = "goldgreen-7")]
4877    Goldgreen7,
4878    #[serde(rename = "goldgreen-8")]
4879    Goldgreen8,
4880    #[serde(rename = "goldgreen-9")]
4881    Goldgreen9,
4882    Goldorange,
4883    #[serde(rename = "goldorange-3")]
4884    Goldorange3,
4885    #[serde(rename = "goldorange-4")]
4886    Goldorange4,
4887    #[serde(rename = "goldorange-5")]
4888    Goldorange5,
4889    #[serde(rename = "goldorange-6")]
4890    Goldorange6,
4891    #[serde(rename = "goldorange-7")]
4892    Goldorange7,
4893    #[serde(rename = "goldorange-8")]
4894    Goldorange8,
4895    #[serde(rename = "goldorange-9")]
4896    Goldorange9,
4897    Goldred,
4898    #[serde(rename = "goldred-3")]
4899    Goldred3,
4900    #[serde(rename = "goldred-4")]
4901    Goldred4,
4902    #[serde(rename = "goldred-5")]
4903    Goldred5,
4904    #[serde(rename = "goldred-6")]
4905    Goldred6,
4906    #[serde(rename = "goldred-7")]
4907    Goldred7,
4908    #[serde(rename = "goldred-8")]
4909    Goldred8,
4910    #[serde(rename = "goldred-9")]
4911    Goldred9,
4912    Greenblue,
4913    #[serde(rename = "greenblue-3")]
4914    Greenblue3,
4915    #[serde(rename = "greenblue-4")]
4916    Greenblue4,
4917    #[serde(rename = "greenblue-5")]
4918    Greenblue5,
4919    #[serde(rename = "greenblue-6")]
4920    Greenblue6,
4921    #[serde(rename = "greenblue-7")]
4922    Greenblue7,
4923    #[serde(rename = "greenblue-8")]
4924    Greenblue8,
4925    #[serde(rename = "greenblue-9")]
4926    Greenblue9,
4927    Greens,
4928    Greys,
4929    Inferno,
4930    Lightgreyred,
4931    #[serde(rename = "lightgreyred-3")]
4932    Lightgreyred3,
4933    #[serde(rename = "lightgreyred-4")]
4934    Lightgreyred4,
4935    #[serde(rename = "lightgreyred-5")]
4936    Lightgreyred5,
4937    #[serde(rename = "lightgreyred-6")]
4938    Lightgreyred6,
4939    #[serde(rename = "lightgreyred-7")]
4940    Lightgreyred7,
4941    #[serde(rename = "lightgreyred-8")]
4942    Lightgreyred8,
4943    #[serde(rename = "lightgreyred-9")]
4944    Lightgreyred9,
4945    Lightgreyteal,
4946    #[serde(rename = "lightgreyteal-3")]
4947    Lightgreyteal3,
4948    #[serde(rename = "lightgreyteal-4")]
4949    Lightgreyteal4,
4950    #[serde(rename = "lightgreyteal-5")]
4951    Lightgreyteal5,
4952    #[serde(rename = "lightgreyteal-6")]
4953    Lightgreyteal6,
4954    #[serde(rename = "lightgreyteal-7")]
4955    Lightgreyteal7,
4956    #[serde(rename = "lightgreyteal-8")]
4957    Lightgreyteal8,
4958    #[serde(rename = "lightgreyteal-9")]
4959    Lightgreyteal9,
4960    Lightmulti,
4961    #[serde(rename = "lightmulti-3")]
4962    Lightmulti3,
4963    #[serde(rename = "lightmulti-4")]
4964    Lightmulti4,
4965    #[serde(rename = "lightmulti-5")]
4966    Lightmulti5,
4967    #[serde(rename = "lightmulti-6")]
4968    Lightmulti6,
4969    #[serde(rename = "lightmulti-7")]
4970    Lightmulti7,
4971    #[serde(rename = "lightmulti-8")]
4972    Lightmulti8,
4973    #[serde(rename = "lightmulti-9")]
4974    Lightmulti9,
4975    Lightorange,
4976    #[serde(rename = "lightorange-3")]
4977    Lightorange3,
4978    #[serde(rename = "lightorange-4")]
4979    Lightorange4,
4980    #[serde(rename = "lightorange-5")]
4981    Lightorange5,
4982    #[serde(rename = "lightorange-6")]
4983    Lightorange6,
4984    #[serde(rename = "lightorange-7")]
4985    Lightorange7,
4986    #[serde(rename = "lightorange-8")]
4987    Lightorange8,
4988    #[serde(rename = "lightorange-9")]
4989    Lightorange9,
4990    Lighttealblue,
4991    #[serde(rename = "lighttealblue-3")]
4992    Lighttealblue3,
4993    #[serde(rename = "lighttealblue-4")]
4994    Lighttealblue4,
4995    #[serde(rename = "lighttealblue-5")]
4996    Lighttealblue5,
4997    #[serde(rename = "lighttealblue-6")]
4998    Lighttealblue6,
4999    #[serde(rename = "lighttealblue-7")]
5000    Lighttealblue7,
5001    #[serde(rename = "lighttealblue-8")]
5002    Lighttealblue8,
5003    #[serde(rename = "lighttealblue-9")]
5004    Lighttealblue9,
5005    Magma,
5006    Observable10,
5007    Orangered,
5008    #[serde(rename = "orangered-3")]
5009    Orangered3,
5010    #[serde(rename = "orangered-4")]
5011    Orangered4,
5012    #[serde(rename = "orangered-5")]
5013    Orangered5,
5014    #[serde(rename = "orangered-6")]
5015    Orangered6,
5016    #[serde(rename = "orangered-7")]
5017    Orangered7,
5018    #[serde(rename = "orangered-8")]
5019    Orangered8,
5020    #[serde(rename = "orangered-9")]
5021    Orangered9,
5022    Oranges,
5023    Paired,
5024    Pastel1,
5025    Pastel2,
5026    Pinkyellowgreen,
5027    #[serde(rename = "pinkyellowgreen-10")]
5028    Pinkyellowgreen10,
5029    #[serde(rename = "pinkyellowgreen-11")]
5030    Pinkyellowgreen11,
5031    #[serde(rename = "pinkyellowgreen-3")]
5032    Pinkyellowgreen3,
5033    #[serde(rename = "pinkyellowgreen-4")]
5034    Pinkyellowgreen4,
5035    #[serde(rename = "pinkyellowgreen-5")]
5036    Pinkyellowgreen5,
5037    #[serde(rename = "pinkyellowgreen-6")]
5038    Pinkyellowgreen6,
5039    #[serde(rename = "pinkyellowgreen-7")]
5040    Pinkyellowgreen7,
5041    #[serde(rename = "pinkyellowgreen-8")]
5042    Pinkyellowgreen8,
5043    #[serde(rename = "pinkyellowgreen-9")]
5044    Pinkyellowgreen9,
5045    Plasma,
5046    Purpleblue,
5047    #[serde(rename = "purpleblue-3")]
5048    Purpleblue3,
5049    #[serde(rename = "purpleblue-4")]
5050    Purpleblue4,
5051    #[serde(rename = "purpleblue-5")]
5052    Purpleblue5,
5053    #[serde(rename = "purpleblue-6")]
5054    Purpleblue6,
5055    #[serde(rename = "purpleblue-7")]
5056    Purpleblue7,
5057    #[serde(rename = "purpleblue-8")]
5058    Purpleblue8,
5059    #[serde(rename = "purpleblue-9")]
5060    Purpleblue9,
5061    Purplebluegreen,
5062    #[serde(rename = "purplebluegreen-3")]
5063    Purplebluegreen3,
5064    #[serde(rename = "purplebluegreen-4")]
5065    Purplebluegreen4,
5066    #[serde(rename = "purplebluegreen-5")]
5067    Purplebluegreen5,
5068    #[serde(rename = "purplebluegreen-6")]
5069    Purplebluegreen6,
5070    #[serde(rename = "purplebluegreen-7")]
5071    Purplebluegreen7,
5072    #[serde(rename = "purplebluegreen-8")]
5073    Purplebluegreen8,
5074    #[serde(rename = "purplebluegreen-9")]
5075    Purplebluegreen9,
5076    Purplegreen,
5077    #[serde(rename = "purplegreen-10")]
5078    Purplegreen10,
5079    #[serde(rename = "purplegreen-11")]
5080    Purplegreen11,
5081    #[serde(rename = "purplegreen-3")]
5082    Purplegreen3,
5083    #[serde(rename = "purplegreen-4")]
5084    Purplegreen4,
5085    #[serde(rename = "purplegreen-5")]
5086    Purplegreen5,
5087    #[serde(rename = "purplegreen-6")]
5088    Purplegreen6,
5089    #[serde(rename = "purplegreen-7")]
5090    Purplegreen7,
5091    #[serde(rename = "purplegreen-8")]
5092    Purplegreen8,
5093    #[serde(rename = "purplegreen-9")]
5094    Purplegreen9,
5095    Purpleorange,
5096    #[serde(rename = "purpleorange-10")]
5097    Purpleorange10,
5098    #[serde(rename = "purpleorange-11")]
5099    Purpleorange11,
5100    #[serde(rename = "purpleorange-3")]
5101    Purpleorange3,
5102    #[serde(rename = "purpleorange-4")]
5103    Purpleorange4,
5104    #[serde(rename = "purpleorange-5")]
5105    Purpleorange5,
5106    #[serde(rename = "purpleorange-6")]
5107    Purpleorange6,
5108    #[serde(rename = "purpleorange-7")]
5109    Purpleorange7,
5110    #[serde(rename = "purpleorange-8")]
5111    Purpleorange8,
5112    #[serde(rename = "purpleorange-9")]
5113    Purpleorange9,
5114    Purplered,
5115    #[serde(rename = "purplered-3")]
5116    Purplered3,
5117    #[serde(rename = "purplered-4")]
5118    Purplered4,
5119    #[serde(rename = "purplered-5")]
5120    Purplered5,
5121    #[serde(rename = "purplered-6")]
5122    Purplered6,
5123    #[serde(rename = "purplered-7")]
5124    Purplered7,
5125    #[serde(rename = "purplered-8")]
5126    Purplered8,
5127    #[serde(rename = "purplered-9")]
5128    Purplered9,
5129    Purples,
5130    Rainbow,
5131    Redblue,
5132    #[serde(rename = "redblue-10")]
5133    Redblue10,
5134    #[serde(rename = "redblue-11")]
5135    Redblue11,
5136    #[serde(rename = "redblue-3")]
5137    Redblue3,
5138    #[serde(rename = "redblue-4")]
5139    Redblue4,
5140    #[serde(rename = "redblue-5")]
5141    Redblue5,
5142    #[serde(rename = "redblue-6")]
5143    Redblue6,
5144    #[serde(rename = "redblue-7")]
5145    Redblue7,
5146    #[serde(rename = "redblue-8")]
5147    Redblue8,
5148    #[serde(rename = "redblue-9")]
5149    Redblue9,
5150    Redgrey,
5151    #[serde(rename = "redgrey-10")]
5152    Redgrey10,
5153    #[serde(rename = "redgrey-11")]
5154    Redgrey11,
5155    #[serde(rename = "redgrey-3")]
5156    Redgrey3,
5157    #[serde(rename = "redgrey-4")]
5158    Redgrey4,
5159    #[serde(rename = "redgrey-5")]
5160    Redgrey5,
5161    #[serde(rename = "redgrey-6")]
5162    Redgrey6,
5163    #[serde(rename = "redgrey-7")]
5164    Redgrey7,
5165    #[serde(rename = "redgrey-8")]
5166    Redgrey8,
5167    #[serde(rename = "redgrey-9")]
5168    Redgrey9,
5169    Redpurple,
5170    #[serde(rename = "redpurple-3")]
5171    Redpurple3,
5172    #[serde(rename = "redpurple-4")]
5173    Redpurple4,
5174    #[serde(rename = "redpurple-5")]
5175    Redpurple5,
5176    #[serde(rename = "redpurple-6")]
5177    Redpurple6,
5178    #[serde(rename = "redpurple-7")]
5179    Redpurple7,
5180    #[serde(rename = "redpurple-8")]
5181    Redpurple8,
5182    #[serde(rename = "redpurple-9")]
5183    Redpurple9,
5184    Reds,
5185    Redyellowblue,
5186    #[serde(rename = "redyellowblue-10")]
5187    Redyellowblue10,
5188    #[serde(rename = "redyellowblue-11")]
5189    Redyellowblue11,
5190    #[serde(rename = "redyellowblue-3")]
5191    Redyellowblue3,
5192    #[serde(rename = "redyellowblue-4")]
5193    Redyellowblue4,
5194    #[serde(rename = "redyellowblue-5")]
5195    Redyellowblue5,
5196    #[serde(rename = "redyellowblue-6")]
5197    Redyellowblue6,
5198    #[serde(rename = "redyellowblue-7")]
5199    Redyellowblue7,
5200    #[serde(rename = "redyellowblue-8")]
5201    Redyellowblue8,
5202    #[serde(rename = "redyellowblue-9")]
5203    Redyellowblue9,
5204    Redyellowgreen,
5205    #[serde(rename = "redyellowgreen-10")]
5206    Redyellowgreen10,
5207    #[serde(rename = "redyellowgreen-11")]
5208    Redyellowgreen11,
5209    #[serde(rename = "redyellowgreen-3")]
5210    Redyellowgreen3,
5211    #[serde(rename = "redyellowgreen-4")]
5212    Redyellowgreen4,
5213    #[serde(rename = "redyellowgreen-5")]
5214    Redyellowgreen5,
5215    #[serde(rename = "redyellowgreen-6")]
5216    Redyellowgreen6,
5217    #[serde(rename = "redyellowgreen-7")]
5218    Redyellowgreen7,
5219    #[serde(rename = "redyellowgreen-8")]
5220    Redyellowgreen8,
5221    #[serde(rename = "redyellowgreen-9")]
5222    Redyellowgreen9,
5223    Set1,
5224    Set2,
5225    Set3,
5226    Sinebow,
5227    Spectral,
5228    #[serde(rename = "spectral-10")]
5229    Spectral10,
5230    #[serde(rename = "spectral-11")]
5231    Spectral11,
5232    #[serde(rename = "spectral-3")]
5233    Spectral3,
5234    #[serde(rename = "spectral-4")]
5235    Spectral4,
5236    #[serde(rename = "spectral-5")]
5237    Spectral5,
5238    #[serde(rename = "spectral-6")]
5239    Spectral6,
5240    #[serde(rename = "spectral-7")]
5241    Spectral7,
5242    #[serde(rename = "spectral-8")]
5243    Spectral8,
5244    #[serde(rename = "spectral-9")]
5245    Spectral9,
5246    Tableau10,
5247    Tableau20,
5248    Tealblues,
5249    Teals,
5250    Turbo,
5251    Viridis,
5252    Warmgreys,
5253    Yellowgreen,
5254    #[serde(rename = "yellowgreen-3")]
5255    Yellowgreen3,
5256    #[serde(rename = "yellowgreen-4")]
5257    Yellowgreen4,
5258    #[serde(rename = "yellowgreen-5")]
5259    Yellowgreen5,
5260    #[serde(rename = "yellowgreen-6")]
5261    Yellowgreen6,
5262    #[serde(rename = "yellowgreen-7")]
5263    Yellowgreen7,
5264    #[serde(rename = "yellowgreen-8")]
5265    Yellowgreen8,
5266    #[serde(rename = "yellowgreen-9")]
5267    Yellowgreen9,
5268    Yellowgreenblue,
5269    #[serde(rename = "yellowgreenblue-3")]
5270    Yellowgreenblue3,
5271    #[serde(rename = "yellowgreenblue-4")]
5272    Yellowgreenblue4,
5273    #[serde(rename = "yellowgreenblue-5")]
5274    Yellowgreenblue5,
5275    #[serde(rename = "yellowgreenblue-6")]
5276    Yellowgreenblue6,
5277    #[serde(rename = "yellowgreenblue-7")]
5278    Yellowgreenblue7,
5279    #[serde(rename = "yellowgreenblue-8")]
5280    Yellowgreenblue8,
5281    #[serde(rename = "yellowgreenblue-9")]
5282    Yellowgreenblue9,
5283    Yelloworangebrown,
5284    #[serde(rename = "yelloworangebrown-3")]
5285    Yelloworangebrown3,
5286    #[serde(rename = "yelloworangebrown-4")]
5287    Yelloworangebrown4,
5288    #[serde(rename = "yelloworangebrown-5")]
5289    Yelloworangebrown5,
5290    #[serde(rename = "yelloworangebrown-6")]
5291    Yelloworangebrown6,
5292    #[serde(rename = "yelloworangebrown-7")]
5293    Yelloworangebrown7,
5294    #[serde(rename = "yelloworangebrown-8")]
5295    Yelloworangebrown8,
5296    #[serde(rename = "yelloworangebrown-9")]
5297    Yelloworangebrown9,
5298    Yelloworangered,
5299    #[serde(rename = "yelloworangered-3")]
5300    Yelloworangered3,
5301    #[serde(rename = "yelloworangered-4")]
5302    Yelloworangered4,
5303    #[serde(rename = "yelloworangered-5")]
5304    Yelloworangered5,
5305    #[serde(rename = "yelloworangered-6")]
5306    Yelloworangered6,
5307    #[serde(rename = "yelloworangered-7")]
5308    Yelloworangered7,
5309    #[serde(rename = "yelloworangered-8")]
5310    Yelloworangered8,
5311    #[serde(rename = "yelloworangered-9")]
5312    Yelloworangered9,
5313}
5314
5315/// Sort order for the encoded field.
5316///
5317/// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
5318/// `"descending"`.
5319///
5320/// For discrete fields, `sort` can be one of the following:
5321/// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
5322/// JavaScript.
5323/// - [A string indicating an encoding channel name to sort
5324/// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
5325/// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
5326/// x-field, descending). This channel string is short-form of [a sort-by-encoding
5327/// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
5328/// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
5329/// "descending"}`.
5330/// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
5331/// for sorting by another field.
5332/// - [An array specifying the field values in preferred
5333/// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
5334/// sort order will obey the values in the array, followed by any unspecified values in their
5335/// original order. For discrete time field, values in the sort array can be [date-time
5336/// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
5337/// the values can be the month or day names (case insensitive) or their 3-letter initials
5338/// (e.g., `"Mon"`, `"Tue"`).
5339/// - `null` indicating no sort.
5340///
5341/// __Default value:__ `"ascending"`
5342///
5343/// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
5344///
5345/// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
5346#[derive(Debug, Clone, Serialize, Deserialize)]
5347#[serde(untagged)]
5348#[derive(From)]
5349pub enum SortUnion {
5350    EncodingSortField(EncodingSortField),
5351    Enum(Sort),
5352    UnionArray(Vec<UnionWith>),
5353}
5354
5355/// A sort definition for sorting a discrete scale in an encoding field definition.
5356#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
5357#[builder(setter(into, strip_option))]
5358pub struct EncodingSortField {
5359    /// The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.
5360    ///
5361    /// __Default value:__ If unspecified, defaults to the field specified in the outer data
5362    /// reference.
5363    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
5364    #[builder(default)]
5365    pub field: RemovableValue<Field>,
5366    /// An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to
5367    /// perform on the field prior to sorting (e.g., `"count"`, `"mean"` and `"median"`). An
5368    /// aggregation is required when there are multiple values of the sort field for each encoded
5369    /// data field. The input data objects will be aggregated, grouped by the encoded data
5370    /// field.
5371    ///
5372    /// For a full list of operations, please see the documentation for
5373    /// [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).
5374    ///
5375    /// __Default value:__ `"sum"` for stacked plots. Otherwise, `"min"`.
5376    #[serde(skip_serializing_if = "Option::is_none")]
5377    #[builder(default)]
5378    pub op: Option<NonArgAggregateOp>,
5379    /// The sort order. One of `"ascending"` (default), `"descending"`, or `null` (no not sort).
5380    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
5381    #[builder(default)]
5382    pub order: RemovableValue<SortOrder>,
5383    /// The [encoding channel](https://vega.github.io/vega-lite/docs/encoding.html#channels) to
5384    /// sort by (e.g., `"x"`, `"y"`)
5385    #[serde(skip_serializing_if = "Option::is_none")]
5386    #[builder(default)]
5387    pub encoding: Option<SortByChannel>,
5388}
5389
5390/// The [encoding channel](https://vega.github.io/vega-lite/docs/encoding.html#channels) to
5391/// sort by (e.g., `"x"`, `"y"`)
5392#[derive(Debug, Clone, Serialize, Deserialize)]
5393#[serde(rename_all = "camelCase")]
5394pub enum SortByChannel {
5395    Color,
5396    Fill,
5397    #[serde(rename = "fillOpacity")]
5398    FillOpacity,
5399    Opacity,
5400    Shape,
5401    Size,
5402    Stroke,
5403    #[serde(rename = "strokeOpacity")]
5404    StrokeOpacity,
5405    #[serde(rename = "strokeWidth")]
5406    StrokeWidth,
5407    Text,
5408    X,
5409    Y,
5410}
5411
5412/// The sort order. One of `"ascending"` (default) or `"descending"`.
5413#[derive(Debug, Clone, Serialize, Deserialize)]
5414#[serde(rename_all = "snake_case")]
5415pub enum SortOrder {
5416    Ascending,
5417    Descending,
5418}
5419
5420/// The sort order. One of `"ascending"` (default) or `"descending"`.
5421///
5422/// The [encoding channel](https://vega.github.io/vega-lite/docs/encoding.html#channels) to
5423/// sort by (e.g., `"x"`, `"y"`)
5424#[derive(Debug, Clone, Serialize, Deserialize)]
5425#[serde(rename_all = "camelCase")]
5426pub enum Sort {
5427    Ascending,
5428    Color,
5429    Descending,
5430    Fill,
5431    #[serde(rename = "fillOpacity")]
5432    FillOpacity,
5433    Opacity,
5434    Shape,
5435    Size,
5436    #[serde(rename = "-color")]
5437    SortColor,
5438    #[serde(rename = "-fill")]
5439    SortFill,
5440    #[serde(rename = "-fillOpacity")]
5441    SortFillOpacity,
5442    #[serde(rename = "-opacity")]
5443    SortOpacity,
5444    #[serde(rename = "-shape")]
5445    SortShape,
5446    #[serde(rename = "-size")]
5447    SortSize,
5448    #[serde(rename = "-stroke")]
5449    SortStroke,
5450    #[serde(rename = "-strokeOpacity")]
5451    SortStrokeOpacity,
5452    #[serde(rename = "-strokeWidth")]
5453    SortStrokeWidth,
5454    #[serde(rename = "-text")]
5455    SortText,
5456    #[serde(rename = "-x")]
5457    SortX,
5458    #[serde(rename = "-y")]
5459    SortY,
5460    Stroke,
5461    #[serde(rename = "strokeOpacity")]
5462    StrokeOpacity,
5463    #[serde(rename = "strokeWidth")]
5464    StrokeWidth,
5465    Text,
5466    X,
5467    Y,
5468}
5469
5470/// Color of the marks – either fill or stroke color based on  the `filled` property of mark
5471/// definition. By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
5472/// `"text"`, `"trail"`, `"circle"`, and `"square"` / stroke color for `"line"` and
5473/// `"point"`.
5474///
5475/// __Default value:__ If undefined, the default color depends on [mark
5476/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
5477/// property.
5478///
5479/// _Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please
5480/// use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher
5481/// precedence than `color`, thus may override the `color` encoding if conflicting encodings
5482/// are specified. 2) See the scale documentation for more information about customizing
5483/// [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).
5484///
5485/// Fill color of the marks. __Default value:__ If undefined, the default color depends on
5486/// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
5487/// property.
5488///
5489/// _Note:_ The `fill` encoding has higher precedence than `color`, thus may override the
5490/// `color` encoding if conflicting encodings are specified.
5491///
5492/// Stroke color of the marks. __Default value:__ If undefined, the default color depends on
5493/// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
5494/// property.
5495///
5496/// _Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the
5497/// `color` encoding if conflicting encodings are specified.
5498///
5499/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
5500#[derive(Debug, Clone, Serialize, Deserialize)]
5501#[serde(rename_all = "camelCase")]
5502#[derive(Default, Builder)]
5503#[builder(setter(into, strip_option))]
5504pub struct ColorClass {
5505    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
5506    /// `"max"`, `"count"`).
5507    ///
5508    /// __Default value:__ `undefined` (None)
5509    ///
5510    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
5511    /// documentation.
5512    #[serde(skip_serializing_if = "Option::is_none")]
5513    #[builder(default)]
5514    pub aggregate: Option<Aggregate>,
5515    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
5516    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
5517    /// middle of the band if set to `0.5`.
5518    #[serde(skip_serializing_if = "Option::is_none")]
5519    #[builder(default)]
5520    pub band_position: Option<f64>,
5521    /// A flag for binning a `quantitative` field, [an object defining binning
5522    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
5523    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
5524    /// (`"binned"`).
5525    ///
5526    /// - If `true`, default [binning
5527    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
5528    /// applied.
5529    ///
5530    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
5531    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
5532    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
5533    /// the axis ticks based on the bin step, you can also set the axis's
5534    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
5535    ///
5536    /// __Default value:__ `false`
5537    ///
5538    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
5539    #[serde(skip_serializing_if = "Option::is_none")]
5540    #[builder(default)]
5541    pub bin: Option<AngleBin>,
5542    /// One or more value definition(s) with [a parameter or a test
5543    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
5544    ///
5545    /// __Note:__ A field definition's `condition` property can only contain [conditional value
5546    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
5547    /// only allows at most one encoded field per encoding channel.
5548    ///
5549    /// A field definition or one or more value definition(s) with a parameter predicate.
5550    #[serde(skip_serializing_if = "Option::is_none")]
5551    #[builder(default)]
5552    pub condition: Option<ColorCondition>,
5553    /// __Required.__ A string defining the name of the field from which to pull a data value or
5554    /// an object defining iterated values from the
5555    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
5556    ///
5557    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
5558    ///
5559    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
5560    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
5561    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
5562    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
5563    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
5564    /// required if `aggregate` is `count`.
5565    #[serde(skip_serializing_if = "Option::is_none")]
5566    #[builder(default)]
5567    pub field: Option<Field>,
5568    /// An object defining properties of the legend. If `null`, the legend for the encoding
5569    /// channel will be removed.
5570    ///
5571    /// __Default value:__ If undefined, default [legend
5572    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
5573    ///
5574    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
5575    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
5576    #[builder(default)]
5577    pub legend: RemovableValue<Legend>,
5578    /// An object defining properties of the channel's scale, which is the function that
5579    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
5580    /// (pixels, colors, sizes) of the encoding channels.
5581    ///
5582    /// If `null`, the scale will be [disabled and the data value will be directly
5583    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
5584    ///
5585    /// __Default value:__ If undefined, default [scale
5586    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
5587    ///
5588    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
5589    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
5590    #[builder(default)]
5591    pub scale: RemovableValue<Scale>,
5592    /// Sort order for the encoded field.
5593    ///
5594    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
5595    /// `"descending"`.
5596    ///
5597    /// For discrete fields, `sort` can be one of the following:
5598    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
5599    /// JavaScript.
5600    /// - [A string indicating an encoding channel name to sort
5601    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
5602    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
5603    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
5604    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
5605    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
5606    /// "descending"}`.
5607    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
5608    /// for sorting by another field.
5609    /// - [An array specifying the field values in preferred
5610    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
5611    /// sort order will obey the values in the array, followed by any unspecified values in their
5612    /// original order. For discrete time field, values in the sort array can be [date-time
5613    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
5614    /// the values can be the month or day names (case insensitive) or their 3-letter initials
5615    /// (e.g., `"Mon"`, `"Tue"`).
5616    /// - `null` indicating no sort.
5617    ///
5618    /// __Default value:__ `"ascending"`
5619    ///
5620    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
5621    ///
5622    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
5623    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
5624    #[builder(default)]
5625    pub sort: RemovableValue<SortUnion>,
5626    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
5627    /// temporal field that gets casted as
5628    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
5629    ///
5630    /// __Default value:__ `undefined` (None)
5631    ///
5632    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
5633    /// documentation.
5634    #[serde(skip_serializing_if = "Option::is_none")]
5635    #[builder(default)]
5636    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
5637    /// A title for the field. If `null`, the title will be removed.
5638    ///
5639    /// __Default value:__  derived from the field's name and transformation function
5640    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
5641    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
5642    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
5643    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
5644    /// name.
5645    ///
5646    /// __Notes__:
5647    ///
5648    /// 1) You can customize the default field title format by providing the
5649    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
5650    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
5651    /// [`fieldTitle` function via the `compile` function's
5652    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
5653    ///
5654    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
5655    /// axis/header/legend title will be used.
5656    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
5657    #[builder(default)]
5658    pub title: RemovableValue<LegendText>,
5659    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
5660    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
5661    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
5662    ///
5663    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
5664    /// is required for a field if: (1) the field is not nominal and the field encoding has no
5665    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
5666    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
5667    /// or `timeUnit`.
5668    ///
5669    /// __Default value:__
5670    ///
5671    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
5672    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
5673    /// following criteria:
5674    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
5675    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
5676    /// `longitude` channel or (3) if the specified scale type is [a quantitative
5677    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
5678    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
5679    /// the specified scale type is a time or utc scale
5680    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
5681    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
5682    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
5683    /// `order`.
5684    ///
5685    /// 2) For a constant value in data domain (`datum`):
5686    /// - `"quantitative"` if the datum is a number
5687    /// - `"nominal"` if the datum is a string
5688    /// - `"temporal"` if the datum is [a date time
5689    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
5690    ///
5691    /// __Note:__
5692    /// - Data `type` describes the semantics of the data rather than the primitive data types
5693    /// (number, string, etc.). The same primitive data type can have different types of
5694    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
5695    /// data.
5696    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
5697    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
5698    /// `1552199579097`).
5699    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
5700    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
5701    /// (for using an ordinal bin
5702    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
5703    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
5704    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
5705    /// [`"ordinal"` (for using an ordinal
5706    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
5707    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
5708    /// the `type` property refers to the post-aggregation data type. For example, we can
5709    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
5710    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
5711    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
5712    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
5713    ///
5714    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
5715    #[serde(rename = "type")]
5716    #[serde(skip_serializing_if = "Option::is_none")]
5717    #[builder(default)]
5718    pub mark_prop_def_gradient_string_null_type: Option<Type>,
5719    /// A constant value in data domain.
5720    #[serde(skip_serializing_if = "Option::is_none")]
5721    #[builder(default)]
5722    pub datum: Option<PrimitiveValue>,
5723    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
5724    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
5725    /// between `0` to `1` for opacity).
5726    #[serde(skip_serializing_if = "Option::is_none")]
5727    #[builder(default)]
5728    pub value: Option<ConditionalValueDefGradientStringNullExprRefValue>,
5729}
5730
5731#[derive(Debug, Clone, Serialize, Deserialize)]
5732#[serde(untagged)]
5733#[derive(From)]
5734pub enum ColorCondition {
5735    ConditionalPValueDefGradientStringNullExprRef(ConditionalPValueDefGradientStringNullExprRef),
5736    ConditionalValueDefGradientStringNullExprRefArray(
5737        Vec<ConditionalValueDefGradientStringNullExprRef>,
5738    ),
5739}
5740
5741#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
5742#[builder(setter(into, strip_option))]
5743pub struct ConditionalValueDefGradientStringNullExprRef {
5744    /// Predicate for triggering the condition
5745    #[serde(skip_serializing_if = "Option::is_none")]
5746    #[builder(default)]
5747    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
5748    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
5749    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
5750    /// between `0` to `1` for opacity).
5751    #[serde(skip_serializing_if = "Option::is_none")]
5752    #[builder(default)]
5753    pub value: Option<ConditionalValueDefGradientStringNullExprRefValue>,
5754    /// For selection parameters, the predicate of empty selections returns true by default.
5755    /// Override this behavior, by setting this property `empty: false`.
5756    #[serde(skip_serializing_if = "Option::is_none")]
5757    #[builder(default)]
5758    pub empty: Option<bool>,
5759    /// Filter using a parameter name.
5760    #[serde(skip_serializing_if = "Option::is_none")]
5761    #[builder(default)]
5762    pub param: Option<String>,
5763}
5764
5765#[derive(Debug, Clone, Serialize, Deserialize)]
5766#[serde(untagged)]
5767#[derive(From)]
5768pub enum ConditionalValueDefGradientStringNullExprRefValue {
5769    String(String),
5770    ValueLinearGradient(ValueLinearGradient),
5771}
5772
5773/// An expression for an array of raw values that, if non-null, directly overrides the
5774/// _domain_ property. This is useful for supporting interactions such as panning or zooming
5775/// a scale. The scale may be initially determined using a data-driven domain, then modified
5776/// in response to user input by setting the rawDomain value.
5777#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
5778#[builder(setter(into, strip_option))]
5779pub struct ValueLinearGradient {
5780    /// The type of gradient. Use `"linear"` for a linear gradient.
5781    ///
5782    /// The type of gradient. Use `"radial"` for a radial gradient.
5783    #[serde(skip_serializing_if = "Option::is_none")]
5784    #[builder(default)]
5785    pub gradient: Option<Gradient>,
5786    #[serde(skip_serializing_if = "Option::is_none")]
5787    #[builder(default)]
5788    pub id: Option<String>,
5789    /// An array of gradient stops defining the gradient color sequence.
5790    #[serde(skip_serializing_if = "Option::is_none")]
5791    #[builder(default)]
5792    pub stops: Option<Vec<GradientStop>>,
5793    /// The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
5794    ///
5795    /// __Default value:__ `0`
5796    ///
5797    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
5798    /// for the gradient.
5799    ///
5800    /// __Default value:__ `0.5`
5801    #[serde(skip_serializing_if = "Option::is_none")]
5802    #[builder(default)]
5803    pub x1: Option<f64>,
5804    /// The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
5805    ///
5806    /// __Default value:__ `1`
5807    ///
5808    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
5809    /// for the gradient.
5810    ///
5811    /// __Default value:__ `0.5`
5812    #[serde(skip_serializing_if = "Option::is_none")]
5813    #[builder(default)]
5814    pub x2: Option<f64>,
5815    /// The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
5816    ///
5817    /// __Default value:__ `0`
5818    ///
5819    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
5820    /// for the gradient.
5821    ///
5822    /// __Default value:__ `0.5`
5823    #[serde(skip_serializing_if = "Option::is_none")]
5824    #[builder(default)]
5825    pub y1: Option<f64>,
5826    /// The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
5827    ///
5828    /// __Default value:__ `0`
5829    ///
5830    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
5831    /// for the gradient.
5832    ///
5833    /// __Default value:__ `0.5`
5834    #[serde(skip_serializing_if = "Option::is_none")]
5835    #[builder(default)]
5836    pub y2: Option<f64>,
5837    /// The radius length, in normalized [0, 1] coordinates, of the inner circle for the
5838    /// gradient.
5839    ///
5840    /// __Default value:__ `0`
5841    #[serde(skip_serializing_if = "Option::is_none")]
5842    #[builder(default)]
5843    pub r1: Option<f64>,
5844    /// The radius length, in normalized [0, 1] coordinates, of the outer circle for the
5845    /// gradient.
5846    ///
5847    /// __Default value:__ `0.5`
5848    #[serde(skip_serializing_if = "Option::is_none")]
5849    #[builder(default)]
5850    pub r2: Option<f64>,
5851    /// Vega expression (which can refer to Vega-Lite parameters).
5852    #[serde(skip_serializing_if = "Option::is_none")]
5853    #[builder(default)]
5854    pub expr: Option<String>,
5855}
5856
5857/// The type of gradient. Use `"linear"` for a linear gradient.
5858///
5859/// The type of gradient. Use `"radial"` for a radial gradient.
5860#[derive(Debug, Clone, Serialize, Deserialize)]
5861#[serde(rename_all = "snake_case")]
5862pub enum Gradient {
5863    Linear,
5864    Radial,
5865}
5866
5867#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
5868#[builder(setter(into, strip_option))]
5869pub struct GradientStop {
5870    /// The color value at this point in the gradient.
5871    #[serde(skip_serializing_if = "Option::is_none")]
5872    #[builder(default)]
5873    pub color: Option<String>,
5874    /// The offset fraction for the color stop, indicating its position within the gradient.
5875    #[serde(skip_serializing_if = "Option::is_none")]
5876    #[builder(default)]
5877    pub offset: Option<f64>,
5878}
5879
5880#[derive(Debug, Clone, Serialize, Deserialize)]
5881#[serde(rename_all = "camelCase")]
5882#[derive(Default, Builder)]
5883#[builder(setter(into, strip_option))]
5884pub struct ConditionalPValueDefGradientStringNullExprRef {
5885    /// Predicate for triggering the condition
5886    #[serde(skip_serializing_if = "Option::is_none")]
5887    #[builder(default)]
5888    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
5889    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
5890    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
5891    /// between `0` to `1` for opacity).
5892    #[serde(skip_serializing_if = "Option::is_none")]
5893    #[builder(default)]
5894    pub value: Option<ConditionalValueDefGradientStringNullExprRefValue>,
5895    /// For selection parameters, the predicate of empty selections returns true by default.
5896    /// Override this behavior, by setting this property `empty: false`.
5897    #[serde(skip_serializing_if = "Option::is_none")]
5898    #[builder(default)]
5899    pub empty: Option<bool>,
5900    /// Filter using a parameter name.
5901    #[serde(skip_serializing_if = "Option::is_none")]
5902    #[builder(default)]
5903    pub param: Option<String>,
5904    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
5905    /// `"max"`, `"count"`).
5906    ///
5907    /// __Default value:__ `undefined` (None)
5908    ///
5909    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
5910    /// documentation.
5911    #[serde(skip_serializing_if = "Option::is_none")]
5912    #[builder(default)]
5913    pub aggregate: Option<Aggregate>,
5914    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
5915    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
5916    /// middle of the band if set to `0.5`.
5917    #[serde(skip_serializing_if = "Option::is_none")]
5918    #[builder(default)]
5919    pub band_position: Option<f64>,
5920    /// A flag for binning a `quantitative` field, [an object defining binning
5921    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
5922    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
5923    /// (`"binned"`).
5924    ///
5925    /// - If `true`, default [binning
5926    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
5927    /// applied.
5928    ///
5929    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
5930    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
5931    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
5932    /// the axis ticks based on the bin step, you can also set the axis's
5933    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
5934    ///
5935    /// __Default value:__ `false`
5936    ///
5937    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
5938    #[serde(skip_serializing_if = "Option::is_none")]
5939    #[builder(default)]
5940    pub bin: Option<AngleBin>,
5941    /// __Required.__ A string defining the name of the field from which to pull a data value or
5942    /// an object defining iterated values from the
5943    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
5944    ///
5945    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
5946    ///
5947    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
5948    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
5949    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
5950    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
5951    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
5952    /// required if `aggregate` is `count`.
5953    #[serde(skip_serializing_if = "Option::is_none")]
5954    #[builder(default)]
5955    pub field: Option<Field>,
5956    /// An object defining properties of the legend. If `null`, the legend for the encoding
5957    /// channel will be removed.
5958    ///
5959    /// __Default value:__ If undefined, default [legend
5960    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
5961    ///
5962    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
5963    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
5964    #[builder(default)]
5965    pub legend: RemovableValue<Legend>,
5966    /// An object defining properties of the channel's scale, which is the function that
5967    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
5968    /// (pixels, colors, sizes) of the encoding channels.
5969    ///
5970    /// If `null`, the scale will be [disabled and the data value will be directly
5971    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
5972    ///
5973    /// __Default value:__ If undefined, default [scale
5974    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
5975    ///
5976    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
5977    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
5978    #[builder(default)]
5979    pub scale: RemovableValue<Scale>,
5980    /// Sort order for the encoded field.
5981    ///
5982    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
5983    /// `"descending"`.
5984    ///
5985    /// For discrete fields, `sort` can be one of the following:
5986    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
5987    /// JavaScript.
5988    /// - [A string indicating an encoding channel name to sort
5989    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
5990    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
5991    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
5992    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
5993    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
5994    /// "descending"}`.
5995    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
5996    /// for sorting by another field.
5997    /// - [An array specifying the field values in preferred
5998    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
5999    /// sort order will obey the values in the array, followed by any unspecified values in their
6000    /// original order. For discrete time field, values in the sort array can be [date-time
6001    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
6002    /// the values can be the month or day names (case insensitive) or their 3-letter initials
6003    /// (e.g., `"Mon"`, `"Tue"`).
6004    /// - `null` indicating no sort.
6005    ///
6006    /// __Default value:__ `"ascending"`
6007    ///
6008    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
6009    ///
6010    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
6011    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
6012    #[builder(default)]
6013    pub sort: RemovableValue<SortUnion>,
6014    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
6015    /// temporal field that gets casted as
6016    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
6017    ///
6018    /// __Default value:__ `undefined` (None)
6019    ///
6020    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
6021    /// documentation.
6022    #[serde(skip_serializing_if = "Option::is_none")]
6023    #[builder(default)]
6024    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
6025    /// A title for the field. If `null`, the title will be removed.
6026    ///
6027    /// __Default value:__  derived from the field's name and transformation function
6028    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
6029    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
6030    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
6031    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
6032    /// name.
6033    ///
6034    /// __Notes__:
6035    ///
6036    /// 1) You can customize the default field title format by providing the
6037    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
6038    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
6039    /// [`fieldTitle` function via the `compile` function's
6040    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
6041    ///
6042    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
6043    /// axis/header/legend title will be used.
6044    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
6045    #[builder(default)]
6046    pub title: RemovableValue<LegendText>,
6047    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
6048    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
6049    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
6050    ///
6051    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
6052    /// is required for a field if: (1) the field is not nominal and the field encoding has no
6053    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
6054    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
6055    /// or `timeUnit`.
6056    ///
6057    /// __Default value:__
6058    ///
6059    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
6060    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
6061    /// following criteria:
6062    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
6063    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
6064    /// `longitude` channel or (3) if the specified scale type is [a quantitative
6065    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
6066    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
6067    /// the specified scale type is a time or utc scale
6068    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
6069    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
6070    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
6071    /// `order`.
6072    ///
6073    /// 2) For a constant value in data domain (`datum`):
6074    /// - `"quantitative"` if the datum is a number
6075    /// - `"nominal"` if the datum is a string
6076    /// - `"temporal"` if the datum is [a date time
6077    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
6078    ///
6079    /// __Note:__
6080    /// - Data `type` describes the semantics of the data rather than the primitive data types
6081    /// (number, string, etc.). The same primitive data type can have different types of
6082    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
6083    /// data.
6084    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
6085    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
6086    /// `1552199579097`).
6087    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
6088    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
6089    /// (for using an ordinal bin
6090    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
6091    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
6092    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
6093    /// [`"ordinal"` (for using an ordinal
6094    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
6095    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
6096    /// the `type` property refers to the post-aggregation data type. For example, we can
6097    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
6098    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
6099    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
6100    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
6101    ///
6102    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
6103    #[serde(rename = "type")]
6104    #[serde(skip_serializing_if = "Option::is_none")]
6105    #[builder(default)]
6106    pub conditional_p_value_def_gradient_string_null_expr_ref_type: Option<Type>,
6107    /// A constant value in data domain.
6108    #[serde(skip_serializing_if = "Option::is_none")]
6109    #[builder(default)]
6110    pub datum: Option<PrimitiveValue>,
6111}
6112
6113/// A field definition for the horizontal facet of trellis plots.
6114///
6115/// A field definition for the vertical facet of trellis plots.
6116#[derive(Debug, Clone, Serialize, Deserialize)]
6117#[serde(rename_all = "camelCase")]
6118#[derive(Default, Builder)]
6119#[builder(setter(into, strip_option))]
6120pub struct RowColumnEncodingFieldDef {
6121    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
6122    /// `"max"`, `"count"`).
6123    ///
6124    /// __Default value:__ `undefined` (None)
6125    ///
6126    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
6127    /// documentation.
6128    #[serde(skip_serializing_if = "Option::is_none")]
6129    #[builder(default)]
6130    pub aggregate: Option<Aggregate>,
6131    /// The alignment to apply to row/column facet's subplot. The supported string values are
6132    /// `"all"`, `"each"`, and `"none"`.
6133    ///
6134    /// - For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed
6135    /// one after the other.
6136    /// - For `"each"`, subviews will be aligned into a clean grid structure, but each row or
6137    /// column may be of variable size.
6138    /// - For `"all"`, subviews will be aligned and each row or column will be sized identically
6139    /// based on the maximum observed size. String values for this property will be applied to
6140    /// both grid rows and columns.
6141    ///
6142    /// __Default value:__ `"all"`.
6143    #[serde(skip_serializing_if = "Option::is_none")]
6144    #[builder(default)]
6145    pub align: Option<LayoutAlign>,
6146    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
6147    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
6148    /// middle of the band if set to `0.5`.
6149    #[serde(skip_serializing_if = "Option::is_none")]
6150    #[builder(default)]
6151    pub band_position: Option<f64>,
6152    /// A flag for binning a `quantitative` field, [an object defining binning
6153    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
6154    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
6155    /// (`"binned"`).
6156    ///
6157    /// - If `true`, default [binning
6158    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
6159    /// applied.
6160    ///
6161    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
6162    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
6163    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
6164    /// the axis ticks based on the bin step, you can also set the axis's
6165    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
6166    ///
6167    /// __Default value:__ `false`
6168    ///
6169    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
6170    #[serde(skip_serializing_if = "Option::is_none")]
6171    #[builder(default)]
6172    pub bin: Option<AngleBin>,
6173    /// Boolean flag indicating if facet's subviews should be centered relative to their
6174    /// respective rows or columns.
6175    ///
6176    /// __Default value:__ `false`
6177    #[serde(skip_serializing_if = "Option::is_none")]
6178    #[builder(default)]
6179    pub center: Option<bool>,
6180    /// __Required.__ A string defining the name of the field from which to pull a data value or
6181    /// an object defining iterated values from the
6182    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
6183    ///
6184    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
6185    ///
6186    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
6187    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
6188    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
6189    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
6190    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
6191    /// required if `aggregate` is `count`.
6192    #[serde(skip_serializing_if = "Option::is_none")]
6193    #[builder(default)]
6194    pub field: Option<Field>,
6195    /// An object defining properties of a facet's header.
6196    #[serde(skip_serializing_if = "Option::is_none")]
6197    #[builder(default)]
6198    pub header: Option<Header>,
6199    /// Sort order for the encoded field.
6200    ///
6201    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
6202    /// `"descending"`.
6203    ///
6204    /// For discrete fields, `sort` can be one of the following:
6205    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
6206    /// JavaScript.
6207    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
6208    /// for sorting by another field.
6209    /// - [An array specifying the field values in preferred
6210    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
6211    /// sort order will obey the values in the array, followed by any unspecified values in their
6212    /// original order. For discrete time field, values in the sort array can be [date-time
6213    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
6214    /// the values can be the month or day names (case insensitive) or their 3-letter initials
6215    /// (e.g., `"Mon"`, `"Tue"`).
6216    /// - `null` indicating no sort.
6217    ///
6218    /// __Default value:__ `"ascending"`
6219    ///
6220    /// __Note:__ `null` is not supported for `row` and `column`.
6221    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
6222    #[builder(default)]
6223    pub sort: RemovableValue<SortArray>,
6224    /// The spacing in pixels between facet's sub-views.
6225    ///
6226    /// __Default value__: Depends on `"spacing"` property of [the view composition
6227    /// configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by
6228    /// default)
6229    #[serde(skip_serializing_if = "Option::is_none")]
6230    #[builder(default)]
6231    pub spacing: Option<f64>,
6232    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
6233    /// temporal field that gets casted as
6234    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
6235    ///
6236    /// __Default value:__ `undefined` (None)
6237    ///
6238    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
6239    /// documentation.
6240    #[serde(skip_serializing_if = "Option::is_none")]
6241    #[builder(default)]
6242    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
6243    /// A title for the field. If `null`, the title will be removed.
6244    ///
6245    /// __Default value:__  derived from the field's name and transformation function
6246    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
6247    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
6248    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
6249    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
6250    /// name.
6251    ///
6252    /// __Notes__:
6253    ///
6254    /// 1) You can customize the default field title format by providing the
6255    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
6256    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
6257    /// [`fieldTitle` function via the `compile` function's
6258    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
6259    ///
6260    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
6261    /// axis/header/legend title will be used.
6262    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
6263    #[builder(default)]
6264    pub title: RemovableValue<LegendText>,
6265    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
6266    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
6267    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
6268    ///
6269    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
6270    /// is required for a field if: (1) the field is not nominal and the field encoding has no
6271    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
6272    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
6273    /// or `timeUnit`.
6274    ///
6275    /// __Default value:__
6276    ///
6277    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
6278    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
6279    /// following criteria:
6280    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
6281    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
6282    /// `longitude` channel or (3) if the specified scale type is [a quantitative
6283    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
6284    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
6285    /// the specified scale type is a time or utc scale
6286    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
6287    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
6288    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
6289    /// `order`.
6290    ///
6291    /// 2) For a constant value in data domain (`datum`):
6292    /// - `"quantitative"` if the datum is a number
6293    /// - `"nominal"` if the datum is a string
6294    /// - `"temporal"` if the datum is [a date time
6295    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
6296    ///
6297    /// __Note:__
6298    /// - Data `type` describes the semantics of the data rather than the primitive data types
6299    /// (number, string, etc.). The same primitive data type can have different types of
6300    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
6301    /// data.
6302    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
6303    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
6304    /// `1552199579097`).
6305    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
6306    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
6307    /// (for using an ordinal bin
6308    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
6309    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
6310    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
6311    /// [`"ordinal"` (for using an ordinal
6312    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
6313    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
6314    /// the `type` property refers to the post-aggregation data type. For example, we can
6315    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
6316    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
6317    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
6318    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
6319    ///
6320    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
6321    #[serde(rename = "type")]
6322    #[serde(skip_serializing_if = "Option::is_none")]
6323    #[builder(default)]
6324    pub row_column_encoding_field_def_type: Option<StandardType>,
6325}
6326
6327/// Headers of row / column channels for faceted plots.
6328#[derive(Debug, Clone, Serialize, Deserialize)]
6329#[serde(rename_all = "camelCase")]
6330#[derive(Default, Builder)]
6331#[builder(setter(into, strip_option))]
6332pub struct Header {
6333    /// When used with the default `"number"` and `"time"` format type, the text formatting
6334    /// pattern for labels of guides (axes, legends, headers) and text marks.
6335    ///
6336    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
6337    /// format pattern](https://github.com/d3/d3-format#locale_format).
6338    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
6339    /// pattern](https://github.com/d3/d3-time-format#locale_format).
6340    ///
6341    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
6342    /// more examples.
6343    ///
6344    /// When used with a [custom
6345    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
6346    /// value will be passed as `format` alongside `datum.value` to the registered function.
6347    ///
6348    /// __Default value:__  Derived from
6349    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
6350    /// number format and from
6351    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
6352    /// format.
6353    #[serde(skip_serializing_if = "Option::is_none")]
6354    #[builder(default)]
6355    pub format: Option<Format>,
6356    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
6357    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
6358    ///
6359    /// __Default value:__
6360    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
6361    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
6362    /// `timeUnit`.
6363    #[serde(skip_serializing_if = "Option::is_none")]
6364    #[builder(default)]
6365    pub format_type: Option<String>,
6366    /// Horizontal text alignment of header labels. One of `"left"`, `"center"`, or `"right"`.
6367    #[serde(skip_serializing_if = "Option::is_none")]
6368    #[builder(default)]
6369    pub label_align: Option<TitleAlignUnion>,
6370    /// The anchor position for placing the labels. One of `"start"`, `"middle"`, or `"end"`. For
6371    /// example, with a label orientation of top these anchor positions map to a left-, center-,
6372    /// or right-aligned label.
6373    #[serde(skip_serializing_if = "Option::is_none")]
6374    #[builder(default)]
6375    pub label_anchor: Option<TitleAnchorEnum>,
6376    /// The rotation angle of the header labels.
6377    ///
6378    /// __Default value:__ `0` for column header, `-90` for row header.
6379    #[serde(skip_serializing_if = "Option::is_none")]
6380    #[builder(default)]
6381    pub label_angle: Option<f64>,
6382    /// The vertical text baseline for the header labels. One of `"alphabetic"` (default),
6383    /// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
6384    /// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
6385    /// relative to the `titleLineHeight` rather than `titleFontSize` alone.
6386    #[serde(skip_serializing_if = "Option::is_none")]
6387    #[builder(default)]
6388    pub label_baseline: Option<TextBaseline>,
6389    /// The color of the header label, can be in hex color code or regular color name.
6390    #[serde(skip_serializing_if = "Option::is_none")]
6391    #[builder(default)]
6392    pub label_color: Option<Box<Color>>,
6393    /// [Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.
6394    ///
6395    /// __Note:__ The label text and value can be assessed via the `label` and `value` properties
6396    /// of the header's backing `datum` object.
6397    #[serde(skip_serializing_if = "Option::is_none")]
6398    #[builder(default)]
6399    pub label_expr: Option<String>,
6400    /// The font of the header label.
6401    #[serde(skip_serializing_if = "Option::is_none")]
6402    #[builder(default)]
6403    pub label_font: Option<Box<Color>>,
6404    /// The font size of the header label, in pixels.
6405    #[serde(skip_serializing_if = "Option::is_none")]
6406    #[builder(default)]
6407    pub label_font_size: Option<CornerRadiusUnion>,
6408    /// The font style of the header label.
6409    #[serde(skip_serializing_if = "Option::is_none")]
6410    #[builder(default)]
6411    pub label_font_style: Option<Box<Color>>,
6412    /// The font weight of the header label.
6413    #[serde(skip_serializing_if = "Option::is_none")]
6414    #[builder(default)]
6415    pub label_font_weight: Option<FontWeightUnion>,
6416    /// The maximum length of the header label in pixels. The text value will be automatically
6417    /// truncated if the rendered size exceeds the limit.
6418    ///
6419    /// __Default value:__ `0`, indicating no limit
6420    #[serde(skip_serializing_if = "Option::is_none")]
6421    #[builder(default)]
6422    pub label_limit: Option<CornerRadiusUnion>,
6423    /// Line height in pixels for multi-line header labels or title text with `"line-top"` or
6424    /// `"line-bottom"` baseline.
6425    #[serde(skip_serializing_if = "Option::is_none")]
6426    #[builder(default)]
6427    pub label_line_height: Option<CornerRadiusUnion>,
6428    /// The orientation of the header label. One of `"top"`, `"bottom"`, `"left"` or `"right"`.
6429    #[serde(skip_serializing_if = "Option::is_none")]
6430    #[builder(default)]
6431    pub label_orient: Option<Orient>,
6432    /// The padding, in pixel, between facet header's label and the plot.
6433    ///
6434    /// __Default value:__ `10`
6435    #[serde(skip_serializing_if = "Option::is_none")]
6436    #[builder(default)]
6437    pub label_padding: Option<CornerRadiusUnion>,
6438    /// A boolean flag indicating if labels should be included as part of the header.
6439    ///
6440    /// __Default value:__ `true`.
6441    #[serde(skip_serializing_if = "Option::is_none")]
6442    #[builder(default)]
6443    pub labels: Option<bool>,
6444    /// Shortcut for setting both labelOrient and titleOrient.
6445    #[serde(skip_serializing_if = "Option::is_none")]
6446    #[builder(default)]
6447    pub orient: Option<Orient>,
6448    /// A title for the field. If `null`, the title will be removed.
6449    ///
6450    /// __Default value:__  derived from the field's name and transformation function
6451    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
6452    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
6453    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
6454    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
6455    /// name.
6456    ///
6457    /// __Notes__:
6458    ///
6459    /// 1) You can customize the default field title format by providing the
6460    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
6461    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
6462    /// [`fieldTitle` function via the `compile` function's
6463    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
6464    ///
6465    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
6466    /// axis/header/legend title will be used.
6467    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
6468    #[builder(default)]
6469    pub title: RemovableValue<LegendText>,
6470    /// Horizontal text alignment (to the anchor) of header titles.
6471    #[serde(skip_serializing_if = "Option::is_none")]
6472    #[builder(default)]
6473    pub title_align: Option<TitleAlignUnion>,
6474    /// The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For
6475    /// example, with an orientation of top these anchor positions map to a left-, center-, or
6476    /// right-aligned title.
6477    #[serde(skip_serializing_if = "Option::is_none")]
6478    #[builder(default)]
6479    pub title_anchor: Option<TitleAnchorEnum>,
6480    /// The rotation angle of the header title.
6481    ///
6482    /// __Default value:__ `0`.
6483    #[serde(skip_serializing_if = "Option::is_none")]
6484    #[builder(default)]
6485    pub title_angle: Option<f64>,
6486    /// The vertical text baseline for the header title. One of `"alphabetic"` (default),
6487    /// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
6488    /// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
6489    /// relative to the `titleLineHeight` rather than `titleFontSize` alone.
6490    ///
6491    /// __Default value:__ `"middle"`
6492    #[serde(skip_serializing_if = "Option::is_none")]
6493    #[builder(default)]
6494    pub title_baseline: Option<TextBaseline>,
6495    /// Color of the header title, can be in hex color code or regular color name.
6496    #[serde(skip_serializing_if = "Option::is_none")]
6497    #[builder(default)]
6498    pub title_color: Option<Box<Color>>,
6499    /// Font of the header title. (e.g., `"Helvetica Neue"`).
6500    #[serde(skip_serializing_if = "Option::is_none")]
6501    #[builder(default)]
6502    pub title_font: Option<Box<Color>>,
6503    /// Font size of the header title.
6504    #[serde(skip_serializing_if = "Option::is_none")]
6505    #[builder(default)]
6506    pub title_font_size: Option<CornerRadiusUnion>,
6507    /// The font style of the header title.
6508    #[serde(skip_serializing_if = "Option::is_none")]
6509    #[builder(default)]
6510    pub title_font_style: Option<Box<Color>>,
6511    /// Font weight of the header title. This can be either a string (e.g `"bold"`, `"normal"`)
6512    /// or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` =
6513    /// `700`).
6514    #[serde(skip_serializing_if = "Option::is_none")]
6515    #[builder(default)]
6516    pub title_font_weight: Option<FontWeightUnion>,
6517    /// The maximum length of the header title in pixels. The text value will be automatically
6518    /// truncated if the rendered size exceeds the limit.
6519    ///
6520    /// __Default value:__ `0`, indicating no limit
6521    #[serde(skip_serializing_if = "Option::is_none")]
6522    #[builder(default)]
6523    pub title_limit: Option<CornerRadiusUnion>,
6524    /// Line height in pixels for multi-line header title text or title text with `"line-top"` or
6525    /// `"line-bottom"` baseline.
6526    #[serde(skip_serializing_if = "Option::is_none")]
6527    #[builder(default)]
6528    pub title_line_height: Option<CornerRadiusUnion>,
6529    /// The orientation of the header title. One of `"top"`, `"bottom"`, `"left"` or `"right"`.
6530    #[serde(skip_serializing_if = "Option::is_none")]
6531    #[builder(default)]
6532    pub title_orient: Option<Orient>,
6533    /// The padding, in pixel, between facet header's title and the label.
6534    ///
6535    /// __Default value:__ `10`
6536    #[serde(skip_serializing_if = "Option::is_none")]
6537    #[builder(default)]
6538    pub title_padding: Option<CornerRadiusUnion>,
6539}
6540
6541/// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
6542/// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
6543/// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
6544///
6545/// Vega-Lite automatically infers data types in many cases as discussed below. However, type
6546/// is required for a field if: (1) the field is not nominal and the field encoding has no
6547/// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
6548/// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
6549/// or `timeUnit`.
6550///
6551/// __Default value:__
6552///
6553/// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
6554/// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
6555/// following criteria:
6556/// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
6557/// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
6558/// `longitude` channel or (3) if the specified scale type is [a quantitative
6559/// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
6560/// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
6561/// the specified scale type is a time or utc scale
6562/// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
6563/// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
6564/// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
6565/// `order`.
6566///
6567/// 2) For a constant value in data domain (`datum`):
6568/// - `"quantitative"` if the datum is a number
6569/// - `"nominal"` if the datum is a string
6570/// - `"temporal"` if the datum is [a date time
6571/// object](https://vega.github.io/vega-lite/docs/datetime.html)
6572///
6573/// __Note:__
6574/// - Data `type` describes the semantics of the data rather than the primitive data types
6575/// (number, string, etc.). The same primitive data type can have different types of
6576/// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
6577/// data.
6578/// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
6579/// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
6580/// `1552199579097`).
6581/// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
6582/// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
6583/// (for using an ordinal bin
6584/// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
6585/// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
6586/// `type` property can be either `"temporal"` (default, for using a temporal scale) or
6587/// [`"ordinal"` (for using an ordinal
6588/// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
6589/// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
6590/// the `type` property refers to the post-aggregation data type. For example, we can
6591/// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
6592/// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
6593/// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
6594/// must have exactly the same type as their primary channels (e.g., `x`, `y`).
6595///
6596/// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
6597#[derive(Debug, Clone, Serialize, Deserialize)]
6598#[serde(rename_all = "snake_case")]
6599pub enum StandardType {
6600    Nominal,
6601    Ordinal,
6602    Quantitative,
6603    Temporal,
6604}
6605
6606#[derive(Debug, Clone, Serialize, Deserialize)]
6607#[serde(untagged)]
6608#[derive(From)]
6609pub enum SortArray {
6610    Enum(SortOrder),
6611    SortEncodingSortField(SortEncodingSortField),
6612    UnionArray(Vec<UnionWith>),
6613}
6614
6615/// A sort definition for sorting a discrete scale in an encoding field definition.
6616#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
6617#[builder(setter(into, strip_option))]
6618pub struct SortEncodingSortField {
6619    /// The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.
6620    ///
6621    /// __Default value:__ If unspecified, defaults to the field specified in the outer data
6622    /// reference.
6623    #[serde(skip_serializing_if = "Option::is_none")]
6624    #[builder(default)]
6625    pub field: Option<Field>,
6626    /// An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to
6627    /// perform on the field prior to sorting (e.g., `"count"`, `"mean"` and `"median"`). An
6628    /// aggregation is required when there are multiple values of the sort field for each encoded
6629    /// data field. The input data objects will be aggregated, grouped by the encoded data
6630    /// field.
6631    ///
6632    /// For a full list of operations, please see the documentation for
6633    /// [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).
6634    ///
6635    /// __Default value:__ `"sum"` for stacked plots. Otherwise, `"min"`.
6636    #[serde(skip_serializing_if = "Option::is_none")]
6637    #[builder(default)]
6638    pub op: Option<NonArgAggregateOp>,
6639    /// The sort order. One of `"ascending"` (default), `"descending"`, or `null` (no not sort).
6640    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
6641    #[builder(default)]
6642    pub order: RemovableValue<SortOrder>,
6643}
6644
6645/// A text description of this mark for ARIA accessibility (SVG output only). For SVG output
6646/// the `"aria-label"` attribute will be set to this description.
6647///
6648/// A URL to load upon mouse click.
6649///
6650/// The URL of an image mark.
6651///
6652/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
6653#[derive(Debug, Clone, Serialize, Deserialize)]
6654#[serde(rename_all = "camelCase")]
6655#[derive(Default, Builder)]
6656#[builder(setter(into, strip_option))]
6657pub struct DescriptionClass {
6658    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
6659    /// `"max"`, `"count"`).
6660    ///
6661    /// __Default value:__ `undefined` (None)
6662    ///
6663    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
6664    /// documentation.
6665    #[serde(skip_serializing_if = "Option::is_none")]
6666    #[builder(default)]
6667    pub aggregate: Option<Aggregate>,
6668    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
6669    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
6670    /// middle of the band if set to `0.5`.
6671    #[serde(skip_serializing_if = "Option::is_none")]
6672    #[builder(default)]
6673    pub band_position: Option<f64>,
6674    /// A flag for binning a `quantitative` field, [an object defining binning
6675    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
6676    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
6677    /// (`"binned"`).
6678    ///
6679    /// - If `true`, default [binning
6680    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
6681    /// applied.
6682    ///
6683    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
6684    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
6685    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
6686    /// the axis ticks based on the bin step, you can also set the axis's
6687    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
6688    ///
6689    /// __Default value:__ `false`
6690    ///
6691    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
6692    #[serde(skip_serializing_if = "Option::is_none")]
6693    #[builder(default)]
6694    pub bin: Option<DescriptionBin>,
6695    /// One or more value definition(s) with [a parameter or a test
6696    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
6697    ///
6698    /// __Note:__ A field definition's `condition` property can only contain [conditional value
6699    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
6700    /// only allows at most one encoded field per encoding channel.
6701    ///
6702    /// A field definition or one or more value definition(s) with a parameter predicate.
6703    #[serde(skip_serializing_if = "Option::is_none")]
6704    #[builder(default)]
6705    pub condition: Option<DescriptionCondition>,
6706    /// __Required.__ A string defining the name of the field from which to pull a data value or
6707    /// an object defining iterated values from the
6708    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
6709    ///
6710    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
6711    ///
6712    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
6713    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
6714    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
6715    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
6716    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
6717    /// required if `aggregate` is `count`.
6718    #[serde(skip_serializing_if = "Option::is_none")]
6719    #[builder(default)]
6720    pub field: Option<Field>,
6721    /// When used with the default `"number"` and `"time"` format type, the text formatting
6722    /// pattern for labels of guides (axes, legends, headers) and text marks.
6723    ///
6724    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
6725    /// format pattern](https://github.com/d3/d3-format#locale_format).
6726    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
6727    /// pattern](https://github.com/d3/d3-time-format#locale_format).
6728    ///
6729    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
6730    /// more examples.
6731    ///
6732    /// When used with a [custom
6733    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
6734    /// value will be passed as `format` alongside `datum.value` to the registered function.
6735    ///
6736    /// __Default value:__  Derived from
6737    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
6738    /// number format and from
6739    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
6740    /// format.
6741    #[serde(skip_serializing_if = "Option::is_none")]
6742    #[builder(default)]
6743    pub format: Option<Format>,
6744    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
6745    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
6746    ///
6747    /// __Default value:__
6748    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
6749    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
6750    /// `timeUnit`.
6751    #[serde(skip_serializing_if = "Option::is_none")]
6752    #[builder(default)]
6753    pub format_type: Option<String>,
6754    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
6755    /// temporal field that gets casted as
6756    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
6757    ///
6758    /// __Default value:__ `undefined` (None)
6759    ///
6760    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
6761    /// documentation.
6762    #[serde(skip_serializing_if = "Option::is_none")]
6763    #[builder(default)]
6764    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
6765    /// A title for the field. If `null`, the title will be removed.
6766    ///
6767    /// __Default value:__  derived from the field's name and transformation function
6768    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
6769    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
6770    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
6771    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
6772    /// name.
6773    ///
6774    /// __Notes__:
6775    ///
6776    /// 1) You can customize the default field title format by providing the
6777    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
6778    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
6779    /// [`fieldTitle` function via the `compile` function's
6780    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
6781    ///
6782    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
6783    /// axis/header/legend title will be used.
6784    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
6785    #[builder(default)]
6786    pub title: RemovableValue<LegendText>,
6787    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
6788    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
6789    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
6790    ///
6791    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
6792    /// is required for a field if: (1) the field is not nominal and the field encoding has no
6793    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
6794    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
6795    /// or `timeUnit`.
6796    ///
6797    /// __Default value:__
6798    ///
6799    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
6800    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
6801    /// following criteria:
6802    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
6803    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
6804    /// `longitude` channel or (3) if the specified scale type is [a quantitative
6805    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
6806    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
6807    /// the specified scale type is a time or utc scale
6808    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
6809    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
6810    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
6811    /// `order`.
6812    ///
6813    /// 2) For a constant value in data domain (`datum`):
6814    /// - `"quantitative"` if the datum is a number
6815    /// - `"nominal"` if the datum is a string
6816    /// - `"temporal"` if the datum is [a date time
6817    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
6818    ///
6819    /// __Note:__
6820    /// - Data `type` describes the semantics of the data rather than the primitive data types
6821    /// (number, string, etc.). The same primitive data type can have different types of
6822    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
6823    /// data.
6824    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
6825    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
6826    /// `1552199579097`).
6827    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
6828    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
6829    /// (for using an ordinal bin
6830    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
6831    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
6832    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
6833    /// [`"ordinal"` (for using an ordinal
6834    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
6835    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
6836    /// the `type` property refers to the post-aggregation data type. For example, we can
6837    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
6838    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
6839    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
6840    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
6841    ///
6842    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
6843    #[serde(rename = "type")]
6844    #[serde(skip_serializing_if = "Option::is_none")]
6845    #[builder(default)]
6846    pub field_or_datum_def_with_condition_string_field_def_string_type: Option<StandardType>,
6847    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
6848    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
6849    /// between `0` to `1` for opacity).
6850    #[serde(skip_serializing_if = "Option::is_none")]
6851    #[builder(default)]
6852    pub value: Option<Box<Color>>,
6853}
6854
6855#[derive(Debug, Clone, Serialize, Deserialize)]
6856#[serde(untagged)]
6857#[derive(From)]
6858pub enum DescriptionBin {
6859    BinParams(BinParams),
6860    Bool(bool),
6861    Enum(BinEnum),
6862}
6863
6864#[derive(Debug, Clone, Serialize, Deserialize)]
6865#[serde(rename_all = "snake_case")]
6866pub enum BinEnum {
6867    Binned,
6868}
6869
6870#[derive(Debug, Clone, Serialize, Deserialize)]
6871#[serde(untagged)]
6872#[derive(From)]
6873pub enum DescriptionCondition {
6874    PurpleConditionalPExprRef(PurpleConditionalPExprRef),
6875    PurpleConditionalValueDefStringExprRefArray(Vec<PurpleConditionalValueDefStringExprRef>),
6876}
6877
6878#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
6879#[builder(setter(into, strip_option))]
6880pub struct PurpleConditionalValueDefStringExprRef {
6881    /// Predicate for triggering the condition
6882    #[serde(skip_serializing_if = "Option::is_none")]
6883    #[builder(default)]
6884    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
6885    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
6886    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
6887    /// between `0` to `1` for opacity).
6888    #[serde(skip_serializing_if = "Option::is_none")]
6889    #[builder(default)]
6890    pub value: Option<Box<Color>>,
6891    /// For selection parameters, the predicate of empty selections returns true by default.
6892    /// Override this behavior, by setting this property `empty: false`.
6893    #[serde(skip_serializing_if = "Option::is_none")]
6894    #[builder(default)]
6895    pub empty: Option<bool>,
6896    /// Filter using a parameter name.
6897    #[serde(skip_serializing_if = "Option::is_none")]
6898    #[builder(default)]
6899    pub param: Option<String>,
6900}
6901
6902#[derive(Debug, Clone, Serialize, Deserialize)]
6903#[serde(rename_all = "camelCase")]
6904#[derive(Default, Builder)]
6905#[builder(setter(into, strip_option))]
6906pub struct PurpleConditionalPExprRef {
6907    /// Predicate for triggering the condition
6908    #[serde(skip_serializing_if = "Option::is_none")]
6909    #[builder(default)]
6910    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
6911    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
6912    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
6913    /// between `0` to `1` for opacity).
6914    #[serde(skip_serializing_if = "Option::is_none")]
6915    #[builder(default)]
6916    pub value: Option<Box<Color>>,
6917    /// For selection parameters, the predicate of empty selections returns true by default.
6918    /// Override this behavior, by setting this property `empty: false`.
6919    #[serde(skip_serializing_if = "Option::is_none")]
6920    #[builder(default)]
6921    pub empty: Option<bool>,
6922    /// Filter using a parameter name.
6923    #[serde(skip_serializing_if = "Option::is_none")]
6924    #[builder(default)]
6925    pub param: Option<String>,
6926    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
6927    /// `"max"`, `"count"`).
6928    ///
6929    /// __Default value:__ `undefined` (None)
6930    ///
6931    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
6932    /// documentation.
6933    #[serde(skip_serializing_if = "Option::is_none")]
6934    #[builder(default)]
6935    pub aggregate: Option<Aggregate>,
6936    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
6937    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
6938    /// middle of the band if set to `0.5`.
6939    #[serde(skip_serializing_if = "Option::is_none")]
6940    #[builder(default)]
6941    pub band_position: Option<f64>,
6942    /// A flag for binning a `quantitative` field, [an object defining binning
6943    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
6944    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
6945    /// (`"binned"`).
6946    ///
6947    /// - If `true`, default [binning
6948    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
6949    /// applied.
6950    ///
6951    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
6952    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
6953    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
6954    /// the axis ticks based on the bin step, you can also set the axis's
6955    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
6956    ///
6957    /// __Default value:__ `false`
6958    ///
6959    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
6960    #[serde(skip_serializing_if = "Option::is_none")]
6961    #[builder(default)]
6962    pub bin: Option<AngleBin>,
6963    /// __Required.__ A string defining the name of the field from which to pull a data value or
6964    /// an object defining iterated values from the
6965    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
6966    ///
6967    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
6968    ///
6969    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
6970    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
6971    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
6972    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
6973    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
6974    /// required if `aggregate` is `count`.
6975    #[serde(skip_serializing_if = "Option::is_none")]
6976    #[builder(default)]
6977    pub field: Option<Field>,
6978    /// An object defining properties of the legend. If `null`, the legend for the encoding
6979    /// channel will be removed.
6980    ///
6981    /// __Default value:__ If undefined, default [legend
6982    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
6983    ///
6984    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
6985    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
6986    #[builder(default)]
6987    pub legend: RemovableValue<Legend>,
6988    /// An object defining properties of the channel's scale, which is the function that
6989    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
6990    /// (pixels, colors, sizes) of the encoding channels.
6991    ///
6992    /// If `null`, the scale will be [disabled and the data value will be directly
6993    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
6994    ///
6995    /// __Default value:__ If undefined, default [scale
6996    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
6997    ///
6998    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
6999    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7000    #[builder(default)]
7001    pub scale: RemovableValue<Scale>,
7002    /// Sort order for the encoded field.
7003    ///
7004    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
7005    /// `"descending"`.
7006    ///
7007    /// For discrete fields, `sort` can be one of the following:
7008    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
7009    /// JavaScript.
7010    /// - [A string indicating an encoding channel name to sort
7011    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
7012    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
7013    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
7014    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
7015    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
7016    /// "descending"}`.
7017    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
7018    /// for sorting by another field.
7019    /// - [An array specifying the field values in preferred
7020    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
7021    /// sort order will obey the values in the array, followed by any unspecified values in their
7022    /// original order. For discrete time field, values in the sort array can be [date-time
7023    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
7024    /// the values can be the month or day names (case insensitive) or their 3-letter initials
7025    /// (e.g., `"Mon"`, `"Tue"`).
7026    /// - `null` indicating no sort.
7027    ///
7028    /// __Default value:__ `"ascending"`
7029    ///
7030    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
7031    ///
7032    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
7033    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7034    #[builder(default)]
7035    pub sort: RemovableValue<SortUnion>,
7036    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
7037    /// temporal field that gets casted as
7038    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
7039    ///
7040    /// __Default value:__ `undefined` (None)
7041    ///
7042    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
7043    /// documentation.
7044    #[serde(skip_serializing_if = "Option::is_none")]
7045    #[builder(default)]
7046    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
7047    /// A title for the field. If `null`, the title will be removed.
7048    ///
7049    /// __Default value:__  derived from the field's name and transformation function
7050    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
7051    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
7052    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
7053    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
7054    /// name.
7055    ///
7056    /// __Notes__:
7057    ///
7058    /// 1) You can customize the default field title format by providing the
7059    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
7060    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
7061    /// [`fieldTitle` function via the `compile` function's
7062    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
7063    ///
7064    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
7065    /// axis/header/legend title will be used.
7066    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7067    #[builder(default)]
7068    pub title: RemovableValue<LegendText>,
7069    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
7070    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
7071    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
7072    ///
7073    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
7074    /// is required for a field if: (1) the field is not nominal and the field encoding has no
7075    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
7076    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
7077    /// or `timeUnit`.
7078    ///
7079    /// __Default value:__
7080    ///
7081    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
7082    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
7083    /// following criteria:
7084    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
7085    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
7086    /// `longitude` channel or (3) if the specified scale type is [a quantitative
7087    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
7088    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
7089    /// the specified scale type is a time or utc scale
7090    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
7091    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
7092    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
7093    /// `order`.
7094    ///
7095    /// 2) For a constant value in data domain (`datum`):
7096    /// - `"quantitative"` if the datum is a number
7097    /// - `"nominal"` if the datum is a string
7098    /// - `"temporal"` if the datum is [a date time
7099    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
7100    ///
7101    /// __Note:__
7102    /// - Data `type` describes the semantics of the data rather than the primitive data types
7103    /// (number, string, etc.). The same primitive data type can have different types of
7104    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
7105    /// data.
7106    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
7107    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
7108    /// `1552199579097`).
7109    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
7110    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
7111    /// (for using an ordinal bin
7112    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
7113    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
7114    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
7115    /// [`"ordinal"` (for using an ordinal
7116    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
7117    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
7118    /// the `type` property refers to the post-aggregation data type. For example, we can
7119    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
7120    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
7121    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
7122    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
7123    ///
7124    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
7125    #[serde(rename = "type")]
7126    #[serde(skip_serializing_if = "Option::is_none")]
7127    #[builder(default)]
7128    pub conditional_p_expr_ref_type: Option<Type>,
7129    /// A constant value in data domain.
7130    #[serde(skip_serializing_if = "Option::is_none")]
7131    #[builder(default)]
7132    pub datum: Option<PrimitiveValue>,
7133}
7134
7135#[derive(Debug, Clone, Serialize, Deserialize)]
7136#[serde(untagged)]
7137#[derive(From)]
7138pub enum Detail {
7139    TypedFieldDef(TypedFieldDef),
7140    TypedFieldDefArray(Vec<TypedFieldDef>),
7141}
7142
7143/// Field Def without scale (and without bin: "binned" support).
7144///
7145/// Definition object for a data field, its type and transformation of an encoding channel.
7146///
7147/// A data field to use as a unique key for data binding. When a visualization’s data is
7148/// updated, the key value will be used to match data elements to existing mark instances.
7149/// Use a key channel to enable object constancy for transitions over dynamic data.
7150#[derive(Debug, Clone, Serialize, Deserialize)]
7151#[serde(rename_all = "camelCase")]
7152#[derive(Default, Builder)]
7153#[builder(setter(into, strip_option))]
7154pub struct TypedFieldDef {
7155    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
7156    /// `"max"`, `"count"`).
7157    ///
7158    /// __Default value:__ `undefined` (None)
7159    ///
7160    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
7161    /// documentation.
7162    #[serde(skip_serializing_if = "Option::is_none")]
7163    #[builder(default)]
7164    pub aggregate: Option<Aggregate>,
7165    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
7166    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
7167    /// middle of the band if set to `0.5`.
7168    #[serde(skip_serializing_if = "Option::is_none")]
7169    #[builder(default)]
7170    pub band_position: Option<f64>,
7171    /// A flag for binning a `quantitative` field, [an object defining binning
7172    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
7173    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
7174    /// (`"binned"`).
7175    ///
7176    /// - If `true`, default [binning
7177    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
7178    /// applied.
7179    ///
7180    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
7181    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
7182    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
7183    /// the axis ticks based on the bin step, you can also set the axis's
7184    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
7185    ///
7186    /// __Default value:__ `false`
7187    ///
7188    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
7189    #[serde(skip_serializing_if = "Option::is_none")]
7190    #[builder(default)]
7191    pub bin: Option<DescriptionBin>,
7192    /// __Required.__ A string defining the name of the field from which to pull a data value or
7193    /// an object defining iterated values from the
7194    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
7195    ///
7196    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
7197    ///
7198    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
7199    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
7200    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
7201    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
7202    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
7203    /// required if `aggregate` is `count`.
7204    #[serde(skip_serializing_if = "Option::is_none")]
7205    #[builder(default)]
7206    pub field: Option<Field>,
7207    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
7208    /// temporal field that gets casted as
7209    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
7210    ///
7211    /// __Default value:__ `undefined` (None)
7212    ///
7213    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
7214    /// documentation.
7215    #[serde(skip_serializing_if = "Option::is_none")]
7216    #[builder(default)]
7217    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
7218    /// A title for the field. If `null`, the title will be removed.
7219    ///
7220    /// __Default value:__  derived from the field's name and transformation function
7221    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
7222    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
7223    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
7224    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
7225    /// name.
7226    ///
7227    /// __Notes__:
7228    ///
7229    /// 1) You can customize the default field title format by providing the
7230    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
7231    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
7232    /// [`fieldTitle` function via the `compile` function's
7233    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
7234    ///
7235    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
7236    /// axis/header/legend title will be used.
7237    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7238    #[builder(default)]
7239    pub title: RemovableValue<LegendText>,
7240    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
7241    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
7242    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
7243    ///
7244    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
7245    /// is required for a field if: (1) the field is not nominal and the field encoding has no
7246    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
7247    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
7248    /// or `timeUnit`.
7249    ///
7250    /// __Default value:__
7251    ///
7252    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
7253    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
7254    /// following criteria:
7255    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
7256    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
7257    /// `longitude` channel or (3) if the specified scale type is [a quantitative
7258    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
7259    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
7260    /// the specified scale type is a time or utc scale
7261    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
7262    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
7263    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
7264    /// `order`.
7265    ///
7266    /// 2) For a constant value in data domain (`datum`):
7267    /// - `"quantitative"` if the datum is a number
7268    /// - `"nominal"` if the datum is a string
7269    /// - `"temporal"` if the datum is [a date time
7270    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
7271    ///
7272    /// __Note:__
7273    /// - Data `type` describes the semantics of the data rather than the primitive data types
7274    /// (number, string, etc.). The same primitive data type can have different types of
7275    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
7276    /// data.
7277    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
7278    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
7279    /// `1552199579097`).
7280    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
7281    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
7282    /// (for using an ordinal bin
7283    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
7284    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
7285    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
7286    /// [`"ordinal"` (for using an ordinal
7287    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
7288    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
7289    /// the `type` property refers to the post-aggregation data type. For example, we can
7290    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
7291    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
7292    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
7293    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
7294    ///
7295    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
7296    #[serde(rename = "type")]
7297    #[serde(skip_serializing_if = "Option::is_none")]
7298    #[builder(default)]
7299    pub typed_field_def_type: Option<StandardType>,
7300}
7301
7302/// A field definition for the (flexible) facet of trellis plots.
7303///
7304/// If either `row` or `column` is specified, this channel will be ignored.
7305#[derive(Debug, Clone, Serialize, Deserialize)]
7306#[serde(rename_all = "camelCase")]
7307#[derive(Default, Builder)]
7308#[builder(setter(into, strip_option))]
7309pub struct FacetEncodingFieldDef {
7310    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
7311    /// `"max"`, `"count"`).
7312    ///
7313    /// __Default value:__ `undefined` (None)
7314    ///
7315    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
7316    /// documentation.
7317    #[serde(skip_serializing_if = "Option::is_none")]
7318    #[builder(default)]
7319    pub aggregate: Option<Aggregate>,
7320    /// The alignment to apply to grid rows and columns. The supported string values are `"all"`,
7321    /// `"each"`, and `"none"`.
7322    ///
7323    /// - For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed
7324    /// one after the other.
7325    /// - For `"each"`, subviews will be aligned into a clean grid structure, but each row or
7326    /// column may be of variable size.
7327    /// - For `"all"`, subviews will be aligned and each row or column will be sized identically
7328    /// based on the maximum observed size. String values for this property will be applied to
7329    /// both grid rows and columns.
7330    ///
7331    /// Alternatively, an object value of the form `{"row": string, "column": string}` can be
7332    /// used to supply different alignments for rows and columns.
7333    ///
7334    /// __Default value:__ `"all"`.
7335    #[serde(skip_serializing_if = "Option::is_none")]
7336    #[builder(default)]
7337    pub align: Option<Box<VegaliteAlign>>,
7338    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
7339    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
7340    /// middle of the band if set to `0.5`.
7341    #[serde(skip_serializing_if = "Option::is_none")]
7342    #[builder(default)]
7343    pub band_position: Option<f64>,
7344    /// A flag for binning a `quantitative` field, [an object defining binning
7345    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
7346    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
7347    /// (`"binned"`).
7348    ///
7349    /// - If `true`, default [binning
7350    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
7351    /// applied.
7352    ///
7353    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
7354    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
7355    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
7356    /// the axis ticks based on the bin step, you can also set the axis's
7357    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
7358    ///
7359    /// __Default value:__ `false`
7360    ///
7361    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
7362    #[serde(skip_serializing_if = "Option::is_none")]
7363    #[builder(default)]
7364    pub bin: Option<AngleBin>,
7365    /// The bounds calculation method to use for determining the extent of a sub-plot. One of
7366    /// `full` (the default) or `flush`.
7367    ///
7368    /// - If set to `full`, the entire calculated bounds (including axes, title, and legend) will
7369    /// be used.
7370    /// - If set to `flush`, only the specified width and height values for the sub-view will be
7371    /// used. The `flush` setting can be useful when attempting to place sub-plots without axes
7372    /// or legends into a uniform grid structure.
7373    ///
7374    /// __Default value:__ `"full"`
7375    #[serde(skip_serializing_if = "Option::is_none")]
7376    #[builder(default)]
7377    pub bounds: Option<Box<Bounds>>,
7378    /// Boolean flag indicating if subviews should be centered relative to their respective rows
7379    /// or columns.
7380    ///
7381    /// An object value of the form `{"row": boolean, "column": boolean}` can be used to supply
7382    /// different centering values for rows and columns.
7383    ///
7384    /// __Default value:__ `false`
7385    #[serde(skip_serializing_if = "Option::is_none")]
7386    #[builder(default)]
7387    pub center: Option<Box<Center>>,
7388    /// The number of columns to include in the view composition layout.
7389    ///
7390    /// __Default value__: `undefined` -- An infinite number of columns (a single row) will be
7391    /// assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel
7392    /// (for `facet` and `repeat`).
7393    ///
7394    /// __Note__:
7395    ///
7396    /// 1) This property is only for:
7397    /// - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)
7398    /// - the `facet` and `repeat` operator with one field/repetition definition (without
7399    /// row/column nesting)
7400    ///
7401    /// 2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using
7402    /// the `row` channel (for `facet` and `repeat`).
7403    #[serde(skip_serializing_if = "Option::is_none")]
7404    #[builder(default)]
7405    pub columns: Option<f64>,
7406    /// __Required.__ A string defining the name of the field from which to pull a data value or
7407    /// an object defining iterated values from the
7408    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
7409    ///
7410    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
7411    ///
7412    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
7413    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
7414    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
7415    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
7416    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
7417    /// required if `aggregate` is `count`.
7418    #[serde(skip_serializing_if = "Option::is_none")]
7419    #[builder(default)]
7420    pub field: Option<Field>,
7421    /// An object defining properties of a facet's header.
7422    #[serde(skip_serializing_if = "Option::is_none")]
7423    #[builder(default)]
7424    pub header: Option<Header>,
7425    /// Sort order for the encoded field.
7426    ///
7427    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
7428    /// `"descending"`.
7429    ///
7430    /// For discrete fields, `sort` can be one of the following:
7431    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
7432    /// JavaScript.
7433    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
7434    /// for sorting by another field.
7435    /// - [An array specifying the field values in preferred
7436    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
7437    /// sort order will obey the values in the array, followed by any unspecified values in their
7438    /// original order. For discrete time field, values in the sort array can be [date-time
7439    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
7440    /// the values can be the month or day names (case insensitive) or their 3-letter initials
7441    /// (e.g., `"Mon"`, `"Tue"`).
7442    /// - `null` indicating no sort.
7443    ///
7444    /// __Default value:__ `"ascending"`
7445    ///
7446    /// __Note:__ `null` is not supported for `row` and `column`.
7447    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7448    #[builder(default)]
7449    pub sort: RemovableValue<SortArray>,
7450    /// The spacing in pixels between sub-views of the composition operator. An object of the
7451    /// form `{"row": number, "column": number}` can be used to set different spacing values for
7452    /// rows and columns.
7453    ///
7454    /// __Default value__: Depends on `"spacing"` property of [the view composition
7455    /// configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by
7456    /// default)
7457    #[serde(skip_serializing_if = "Option::is_none")]
7458    #[builder(default)]
7459    pub spacing: Option<Box<Spacing>>,
7460    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
7461    /// temporal field that gets casted as
7462    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
7463    ///
7464    /// __Default value:__ `undefined` (None)
7465    ///
7466    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
7467    /// documentation.
7468    #[serde(skip_serializing_if = "Option::is_none")]
7469    #[builder(default)]
7470    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
7471    /// A title for the field. If `null`, the title will be removed.
7472    ///
7473    /// __Default value:__  derived from the field's name and transformation function
7474    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
7475    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
7476    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
7477    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
7478    /// name.
7479    ///
7480    /// __Notes__:
7481    ///
7482    /// 1) You can customize the default field title format by providing the
7483    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
7484    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
7485    /// [`fieldTitle` function via the `compile` function's
7486    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
7487    ///
7488    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
7489    /// axis/header/legend title will be used.
7490    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7491    #[builder(default)]
7492    pub title: RemovableValue<LegendText>,
7493    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
7494    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
7495    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
7496    ///
7497    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
7498    /// is required for a field if: (1) the field is not nominal and the field encoding has no
7499    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
7500    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
7501    /// or `timeUnit`.
7502    ///
7503    /// __Default value:__
7504    ///
7505    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
7506    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
7507    /// following criteria:
7508    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
7509    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
7510    /// `longitude` channel or (3) if the specified scale type is [a quantitative
7511    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
7512    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
7513    /// the specified scale type is a time or utc scale
7514    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
7515    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
7516    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
7517    /// `order`.
7518    ///
7519    /// 2) For a constant value in data domain (`datum`):
7520    /// - `"quantitative"` if the datum is a number
7521    /// - `"nominal"` if the datum is a string
7522    /// - `"temporal"` if the datum is [a date time
7523    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
7524    ///
7525    /// __Note:__
7526    /// - Data `type` describes the semantics of the data rather than the primitive data types
7527    /// (number, string, etc.). The same primitive data type can have different types of
7528    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
7529    /// data.
7530    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
7531    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
7532    /// `1552199579097`).
7533    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
7534    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
7535    /// (for using an ordinal bin
7536    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
7537    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
7538    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
7539    /// [`"ordinal"` (for using an ordinal
7540    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
7541    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
7542    /// the `type` property refers to the post-aggregation data type. For example, we can
7543    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
7544    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
7545    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
7546    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
7547    ///
7548    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
7549    #[serde(rename = "type")]
7550    #[serde(skip_serializing_if = "Option::is_none")]
7551    #[builder(default)]
7552    pub facet_encoding_field_def_type: Option<StandardType>,
7553}
7554
7555#[derive(Debug, Clone, Serialize, Deserialize)]
7556#[serde(untagged)]
7557#[derive(From)]
7558pub enum Spacing {
7559    Double(f64),
7560    RowColNumber(RowColNumber),
7561}
7562
7563#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
7564#[builder(setter(into, strip_option))]
7565pub struct RowColNumber {
7566    #[serde(skip_serializing_if = "Option::is_none")]
7567    #[builder(default)]
7568    pub column: Option<f64>,
7569    #[serde(skip_serializing_if = "Option::is_none")]
7570    #[builder(default)]
7571    pub row: Option<f64>,
7572}
7573
7574/// Color of the marks – either fill or stroke color based on  the `filled` property of mark
7575/// definition. By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
7576/// `"text"`, `"trail"`, `"circle"`, and `"square"` / stroke color for `"line"` and
7577/// `"point"`.
7578///
7579/// __Default value:__ If undefined, the default color depends on [mark
7580/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
7581/// property.
7582///
7583/// _Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please
7584/// use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher
7585/// precedence than `color`, thus may override the `color` encoding if conflicting encodings
7586/// are specified. 2) See the scale documentation for more information about customizing
7587/// [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).
7588///
7589/// Fill color of the marks. __Default value:__ If undefined, the default color depends on
7590/// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
7591/// property.
7592///
7593/// _Note:_ The `fill` encoding has higher precedence than `color`, thus may override the
7594/// `color` encoding if conflicting encodings are specified.
7595///
7596/// Stroke color of the marks. __Default value:__ If undefined, the default color depends on
7597/// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
7598/// property.
7599///
7600/// _Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the
7601/// `color` encoding if conflicting encodings are specified.
7602///
7603/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
7604#[derive(Debug, Clone, Serialize, Deserialize)]
7605#[serde(rename_all = "camelCase")]
7606#[derive(Default, Builder)]
7607#[builder(setter(into, strip_option))]
7608pub struct FillClass {
7609    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
7610    /// `"max"`, `"count"`).
7611    ///
7612    /// __Default value:__ `undefined` (None)
7613    ///
7614    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
7615    /// documentation.
7616    #[serde(skip_serializing_if = "Option::is_none")]
7617    #[builder(default)]
7618    pub aggregate: Option<Aggregate>,
7619    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
7620    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
7621    /// middle of the band if set to `0.5`.
7622    #[serde(skip_serializing_if = "Option::is_none")]
7623    #[builder(default)]
7624    pub band_position: Option<f64>,
7625    /// A flag for binning a `quantitative` field, [an object defining binning
7626    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
7627    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
7628    /// (`"binned"`).
7629    ///
7630    /// - If `true`, default [binning
7631    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
7632    /// applied.
7633    ///
7634    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
7635    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
7636    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
7637    /// the axis ticks based on the bin step, you can also set the axis's
7638    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
7639    ///
7640    /// __Default value:__ `false`
7641    ///
7642    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
7643    #[serde(skip_serializing_if = "Option::is_none")]
7644    #[builder(default)]
7645    pub bin: Option<AngleBin>,
7646    /// One or more value definition(s) with [a parameter or a test
7647    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
7648    ///
7649    /// __Note:__ A field definition's `condition` property can only contain [conditional value
7650    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
7651    /// only allows at most one encoded field per encoding channel.
7652    ///
7653    /// A field definition or one or more value definition(s) with a parameter predicate.
7654    #[serde(skip_serializing_if = "Option::is_none")]
7655    #[builder(default)]
7656    pub condition: Option<ColorCondition>,
7657    /// __Required.__ A string defining the name of the field from which to pull a data value or
7658    /// an object defining iterated values from the
7659    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
7660    ///
7661    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
7662    ///
7663    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
7664    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
7665    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
7666    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
7667    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
7668    /// required if `aggregate` is `count`.
7669    #[serde(skip_serializing_if = "Option::is_none")]
7670    #[builder(default)]
7671    pub field: Option<Field>,
7672    /// An object defining properties of the legend. If `null`, the legend for the encoding
7673    /// channel will be removed.
7674    ///
7675    /// __Default value:__ If undefined, default [legend
7676    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
7677    ///
7678    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
7679    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7680    #[builder(default)]
7681    pub legend: RemovableValue<Legend>,
7682    /// An object defining properties of the channel's scale, which is the function that
7683    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
7684    /// (pixels, colors, sizes) of the encoding channels.
7685    ///
7686    /// If `null`, the scale will be [disabled and the data value will be directly
7687    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
7688    ///
7689    /// __Default value:__ If undefined, default [scale
7690    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
7691    ///
7692    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
7693    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7694    #[builder(default)]
7695    pub scale: RemovableValue<Scale>,
7696    /// Sort order for the encoded field.
7697    ///
7698    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
7699    /// `"descending"`.
7700    ///
7701    /// For discrete fields, `sort` can be one of the following:
7702    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
7703    /// JavaScript.
7704    /// - [A string indicating an encoding channel name to sort
7705    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
7706    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
7707    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
7708    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
7709    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
7710    /// "descending"}`.
7711    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
7712    /// for sorting by another field.
7713    /// - [An array specifying the field values in preferred
7714    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
7715    /// sort order will obey the values in the array, followed by any unspecified values in their
7716    /// original order. For discrete time field, values in the sort array can be [date-time
7717    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
7718    /// the values can be the month or day names (case insensitive) or their 3-letter initials
7719    /// (e.g., `"Mon"`, `"Tue"`).
7720    /// - `null` indicating no sort.
7721    ///
7722    /// __Default value:__ `"ascending"`
7723    ///
7724    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
7725    ///
7726    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
7727    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7728    #[builder(default)]
7729    pub sort: RemovableValue<SortUnion>,
7730    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
7731    /// temporal field that gets casted as
7732    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
7733    ///
7734    /// __Default value:__ `undefined` (None)
7735    ///
7736    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
7737    /// documentation.
7738    #[serde(skip_serializing_if = "Option::is_none")]
7739    #[builder(default)]
7740    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
7741    /// A title for the field. If `null`, the title will be removed.
7742    ///
7743    /// __Default value:__  derived from the field's name and transformation function
7744    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
7745    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
7746    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
7747    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
7748    /// name.
7749    ///
7750    /// __Notes__:
7751    ///
7752    /// 1) You can customize the default field title format by providing the
7753    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
7754    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
7755    /// [`fieldTitle` function via the `compile` function's
7756    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
7757    ///
7758    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
7759    /// axis/header/legend title will be used.
7760    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7761    #[builder(default)]
7762    pub title: RemovableValue<LegendText>,
7763    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
7764    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
7765    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
7766    ///
7767    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
7768    /// is required for a field if: (1) the field is not nominal and the field encoding has no
7769    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
7770    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
7771    /// or `timeUnit`.
7772    ///
7773    /// __Default value:__
7774    ///
7775    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
7776    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
7777    /// following criteria:
7778    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
7779    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
7780    /// `longitude` channel or (3) if the specified scale type is [a quantitative
7781    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
7782    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
7783    /// the specified scale type is a time or utc scale
7784    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
7785    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
7786    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
7787    /// `order`.
7788    ///
7789    /// 2) For a constant value in data domain (`datum`):
7790    /// - `"quantitative"` if the datum is a number
7791    /// - `"nominal"` if the datum is a string
7792    /// - `"temporal"` if the datum is [a date time
7793    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
7794    ///
7795    /// __Note:__
7796    /// - Data `type` describes the semantics of the data rather than the primitive data types
7797    /// (number, string, etc.). The same primitive data type can have different types of
7798    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
7799    /// data.
7800    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
7801    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
7802    /// `1552199579097`).
7803    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
7804    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
7805    /// (for using an ordinal bin
7806    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
7807    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
7808    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
7809    /// [`"ordinal"` (for using an ordinal
7810    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
7811    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
7812    /// the `type` property refers to the post-aggregation data type. For example, we can
7813    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
7814    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
7815    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
7816    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
7817    ///
7818    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
7819    #[serde(rename = "type")]
7820    #[serde(skip_serializing_if = "Option::is_none")]
7821    #[builder(default)]
7822    pub mark_prop_def_gradient_string_null_type: Option<Type>,
7823    /// A constant value in data domain.
7824    #[serde(skip_serializing_if = "Option::is_none")]
7825    #[builder(default)]
7826    pub datum: Option<PrimitiveValue>,
7827    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
7828    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
7829    /// between `0` to `1` for opacity).
7830    #[serde(skip_serializing_if = "Option::is_none")]
7831    #[builder(default)]
7832    pub value: Option<ConditionalValueDefGradientStringNullExprRefValue>,
7833}
7834
7835/// Rotation angle of point and text marks.
7836///
7837/// Fill opacity of the marks.
7838///
7839/// __Default value:__ If undefined, the default opacity depends on [mark
7840/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
7841/// property.
7842///
7843/// Opacity of the marks.
7844///
7845/// __Default value:__ If undefined, the default opacity depends on [mark
7846/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
7847/// property.
7848///
7849/// Size of the mark.
7850/// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
7851/// - For `"bar"` and `"tick"` – the bar and tick's size.
7852/// - For `"text"` – the text's font size.
7853/// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
7854/// line with varying size)
7855///
7856/// Stroke opacity of the marks.
7857///
7858/// __Default value:__ If undefined, the default opacity depends on [mark
7859/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
7860/// property.
7861///
7862/// Stroke width of the marks.
7863///
7864/// __Default value:__ If undefined, the default stroke width depends on [mark
7865/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
7866/// property.
7867///
7868/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
7869#[derive(Debug, Clone, Serialize, Deserialize)]
7870#[serde(rename_all = "camelCase")]
7871#[derive(Default, Builder)]
7872#[builder(setter(into, strip_option))]
7873pub struct FillOpacityClass {
7874    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
7875    /// `"max"`, `"count"`).
7876    ///
7877    /// __Default value:__ `undefined` (None)
7878    ///
7879    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
7880    /// documentation.
7881    #[serde(skip_serializing_if = "Option::is_none")]
7882    #[builder(default)]
7883    pub aggregate: Option<Aggregate>,
7884    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
7885    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
7886    /// middle of the band if set to `0.5`.
7887    #[serde(skip_serializing_if = "Option::is_none")]
7888    #[builder(default)]
7889    pub band_position: Option<f64>,
7890    /// A flag for binning a `quantitative` field, [an object defining binning
7891    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
7892    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
7893    /// (`"binned"`).
7894    ///
7895    /// - If `true`, default [binning
7896    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
7897    /// applied.
7898    ///
7899    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
7900    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
7901    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
7902    /// the axis ticks based on the bin step, you can also set the axis's
7903    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
7904    ///
7905    /// __Default value:__ `false`
7906    ///
7907    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
7908    #[serde(skip_serializing_if = "Option::is_none")]
7909    #[builder(default)]
7910    pub bin: Option<AngleBin>,
7911    /// One or more value definition(s) with [a parameter or a test
7912    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
7913    ///
7914    /// __Note:__ A field definition's `condition` property can only contain [conditional value
7915    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
7916    /// only allows at most one encoded field per encoding channel.
7917    ///
7918    /// A field definition or one or more value definition(s) with a parameter predicate.
7919    #[serde(skip_serializing_if = "Option::is_none")]
7920    #[builder(default)]
7921    pub condition: Option<AngleCondition>,
7922    /// __Required.__ A string defining the name of the field from which to pull a data value or
7923    /// an object defining iterated values from the
7924    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
7925    ///
7926    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
7927    ///
7928    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
7929    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
7930    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
7931    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
7932    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
7933    /// required if `aggregate` is `count`.
7934    #[serde(skip_serializing_if = "Option::is_none")]
7935    #[builder(default)]
7936    pub field: Option<Field>,
7937    /// An object defining properties of the legend. If `null`, the legend for the encoding
7938    /// channel will be removed.
7939    ///
7940    /// __Default value:__ If undefined, default [legend
7941    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
7942    ///
7943    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
7944    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7945    #[builder(default)]
7946    pub legend: RemovableValue<Legend>,
7947    /// An object defining properties of the channel's scale, which is the function that
7948    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
7949    /// (pixels, colors, sizes) of the encoding channels.
7950    ///
7951    /// If `null`, the scale will be [disabled and the data value will be directly
7952    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
7953    ///
7954    /// __Default value:__ If undefined, default [scale
7955    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
7956    ///
7957    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
7958    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7959    #[builder(default)]
7960    pub scale: RemovableValue<Scale>,
7961    /// Sort order for the encoded field.
7962    ///
7963    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
7964    /// `"descending"`.
7965    ///
7966    /// For discrete fields, `sort` can be one of the following:
7967    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
7968    /// JavaScript.
7969    /// - [A string indicating an encoding channel name to sort
7970    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
7971    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
7972    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
7973    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
7974    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
7975    /// "descending"}`.
7976    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
7977    /// for sorting by another field.
7978    /// - [An array specifying the field values in preferred
7979    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
7980    /// sort order will obey the values in the array, followed by any unspecified values in their
7981    /// original order. For discrete time field, values in the sort array can be [date-time
7982    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
7983    /// the values can be the month or day names (case insensitive) or their 3-letter initials
7984    /// (e.g., `"Mon"`, `"Tue"`).
7985    /// - `null` indicating no sort.
7986    ///
7987    /// __Default value:__ `"ascending"`
7988    ///
7989    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
7990    ///
7991    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
7992    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
7993    #[builder(default)]
7994    pub sort: RemovableValue<SortUnion>,
7995    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
7996    /// temporal field that gets casted as
7997    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
7998    ///
7999    /// __Default value:__ `undefined` (None)
8000    ///
8001    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
8002    /// documentation.
8003    #[serde(skip_serializing_if = "Option::is_none")]
8004    #[builder(default)]
8005    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
8006    /// A title for the field. If `null`, the title will be removed.
8007    ///
8008    /// __Default value:__  derived from the field's name and transformation function
8009    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
8010    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
8011    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
8012    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
8013    /// name.
8014    ///
8015    /// __Notes__:
8016    ///
8017    /// 1) You can customize the default field title format by providing the
8018    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
8019    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
8020    /// [`fieldTitle` function via the `compile` function's
8021    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
8022    ///
8023    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
8024    /// axis/header/legend title will be used.
8025    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
8026    #[builder(default)]
8027    pub title: RemovableValue<LegendText>,
8028    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
8029    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
8030    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
8031    ///
8032    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
8033    /// is required for a field if: (1) the field is not nominal and the field encoding has no
8034    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
8035    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
8036    /// or `timeUnit`.
8037    ///
8038    /// __Default value:__
8039    ///
8040    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
8041    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
8042    /// following criteria:
8043    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
8044    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
8045    /// `longitude` channel or (3) if the specified scale type is [a quantitative
8046    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
8047    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
8048    /// the specified scale type is a time or utc scale
8049    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
8050    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
8051    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
8052    /// `order`.
8053    ///
8054    /// 2) For a constant value in data domain (`datum`):
8055    /// - `"quantitative"` if the datum is a number
8056    /// - `"nominal"` if the datum is a string
8057    /// - `"temporal"` if the datum is [a date time
8058    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
8059    ///
8060    /// __Note:__
8061    /// - Data `type` describes the semantics of the data rather than the primitive data types
8062    /// (number, string, etc.). The same primitive data type can have different types of
8063    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
8064    /// data.
8065    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
8066    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
8067    /// `1552199579097`).
8068    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
8069    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
8070    /// (for using an ordinal bin
8071    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8072    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
8073    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
8074    /// [`"ordinal"` (for using an ordinal
8075    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8076    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
8077    /// the `type` property refers to the post-aggregation data type. For example, we can
8078    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
8079    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
8080    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
8081    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
8082    ///
8083    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
8084    #[serde(rename = "type")]
8085    #[serde(skip_serializing_if = "Option::is_none")]
8086    #[builder(default)]
8087    pub mark_prop_def_number_type: Option<Type>,
8088    /// A constant value in data domain.
8089    #[serde(skip_serializing_if = "Option::is_none")]
8090    #[builder(default)]
8091    pub datum: Option<PrimitiveValue>,
8092    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
8093    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
8094    /// between `0` to `1` for opacity).
8095    #[serde(skip_serializing_if = "Option::is_none")]
8096    #[builder(default)]
8097    pub value: Option<CornerRadiusUnion>,
8098}
8099
8100/// A text description of this mark for ARIA accessibility (SVG output only). For SVG output
8101/// the `"aria-label"` attribute will be set to this description.
8102///
8103/// A URL to load upon mouse click.
8104///
8105/// The URL of an image mark.
8106///
8107/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
8108#[derive(Debug, Clone, Serialize, Deserialize)]
8109#[serde(rename_all = "camelCase")]
8110#[derive(Default, Builder)]
8111#[builder(setter(into, strip_option))]
8112pub struct HrefClass {
8113    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
8114    /// `"max"`, `"count"`).
8115    ///
8116    /// __Default value:__ `undefined` (None)
8117    ///
8118    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
8119    /// documentation.
8120    #[serde(skip_serializing_if = "Option::is_none")]
8121    #[builder(default)]
8122    pub aggregate: Option<Aggregate>,
8123    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
8124    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
8125    /// middle of the band if set to `0.5`.
8126    #[serde(skip_serializing_if = "Option::is_none")]
8127    #[builder(default)]
8128    pub band_position: Option<f64>,
8129    /// A flag for binning a `quantitative` field, [an object defining binning
8130    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
8131    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
8132    /// (`"binned"`).
8133    ///
8134    /// - If `true`, default [binning
8135    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
8136    /// applied.
8137    ///
8138    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
8139    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
8140    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
8141    /// the axis ticks based on the bin step, you can also set the axis's
8142    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
8143    ///
8144    /// __Default value:__ `false`
8145    ///
8146    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
8147    #[serde(skip_serializing_if = "Option::is_none")]
8148    #[builder(default)]
8149    pub bin: Option<DescriptionBin>,
8150    /// One or more value definition(s) with [a parameter or a test
8151    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
8152    ///
8153    /// __Note:__ A field definition's `condition` property can only contain [conditional value
8154    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
8155    /// only allows at most one encoded field per encoding channel.
8156    ///
8157    /// A field definition or one or more value definition(s) with a parameter predicate.
8158    #[serde(skip_serializing_if = "Option::is_none")]
8159    #[builder(default)]
8160    pub condition: Option<DescriptionCondition>,
8161    /// __Required.__ A string defining the name of the field from which to pull a data value or
8162    /// an object defining iterated values from the
8163    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
8164    ///
8165    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
8166    ///
8167    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
8168    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
8169    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
8170    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
8171    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
8172    /// required if `aggregate` is `count`.
8173    #[serde(skip_serializing_if = "Option::is_none")]
8174    #[builder(default)]
8175    pub field: Option<Field>,
8176    /// When used with the default `"number"` and `"time"` format type, the text formatting
8177    /// pattern for labels of guides (axes, legends, headers) and text marks.
8178    ///
8179    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
8180    /// format pattern](https://github.com/d3/d3-format#locale_format).
8181    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
8182    /// pattern](https://github.com/d3/d3-time-format#locale_format).
8183    ///
8184    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
8185    /// more examples.
8186    ///
8187    /// When used with a [custom
8188    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
8189    /// value will be passed as `format` alongside `datum.value` to the registered function.
8190    ///
8191    /// __Default value:__  Derived from
8192    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
8193    /// number format and from
8194    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
8195    /// format.
8196    #[serde(skip_serializing_if = "Option::is_none")]
8197    #[builder(default)]
8198    pub format: Option<Format>,
8199    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
8200    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
8201    ///
8202    /// __Default value:__
8203    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
8204    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
8205    /// `timeUnit`.
8206    #[serde(skip_serializing_if = "Option::is_none")]
8207    #[builder(default)]
8208    pub format_type: Option<String>,
8209    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
8210    /// temporal field that gets casted as
8211    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
8212    ///
8213    /// __Default value:__ `undefined` (None)
8214    ///
8215    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
8216    /// documentation.
8217    #[serde(skip_serializing_if = "Option::is_none")]
8218    #[builder(default)]
8219    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
8220    /// A title for the field. If `null`, the title will be removed.
8221    ///
8222    /// __Default value:__  derived from the field's name and transformation function
8223    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
8224    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
8225    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
8226    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
8227    /// name.
8228    ///
8229    /// __Notes__:
8230    ///
8231    /// 1) You can customize the default field title format by providing the
8232    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
8233    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
8234    /// [`fieldTitle` function via the `compile` function's
8235    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
8236    ///
8237    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
8238    /// axis/header/legend title will be used.
8239    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
8240    #[builder(default)]
8241    pub title: RemovableValue<LegendText>,
8242    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
8243    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
8244    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
8245    ///
8246    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
8247    /// is required for a field if: (1) the field is not nominal and the field encoding has no
8248    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
8249    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
8250    /// or `timeUnit`.
8251    ///
8252    /// __Default value:__
8253    ///
8254    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
8255    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
8256    /// following criteria:
8257    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
8258    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
8259    /// `longitude` channel or (3) if the specified scale type is [a quantitative
8260    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
8261    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
8262    /// the specified scale type is a time or utc scale
8263    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
8264    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
8265    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
8266    /// `order`.
8267    ///
8268    /// 2) For a constant value in data domain (`datum`):
8269    /// - `"quantitative"` if the datum is a number
8270    /// - `"nominal"` if the datum is a string
8271    /// - `"temporal"` if the datum is [a date time
8272    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
8273    ///
8274    /// __Note:__
8275    /// - Data `type` describes the semantics of the data rather than the primitive data types
8276    /// (number, string, etc.). The same primitive data type can have different types of
8277    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
8278    /// data.
8279    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
8280    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
8281    /// `1552199579097`).
8282    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
8283    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
8284    /// (for using an ordinal bin
8285    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8286    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
8287    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
8288    /// [`"ordinal"` (for using an ordinal
8289    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8290    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
8291    /// the `type` property refers to the post-aggregation data type. For example, we can
8292    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
8293    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
8294    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
8295    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
8296    ///
8297    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
8298    #[serde(rename = "type")]
8299    #[serde(skip_serializing_if = "Option::is_none")]
8300    #[builder(default)]
8301    pub field_or_datum_def_with_condition_string_field_def_string_type: Option<StandardType>,
8302    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
8303    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
8304    /// between `0` to `1` for opacity).
8305    #[serde(skip_serializing_if = "Option::is_none")]
8306    #[builder(default)]
8307    pub value: Option<Box<Color>>,
8308}
8309
8310/// Field Def without scale (and without bin: "binned" support).
8311///
8312/// Definition object for a data field, its type and transformation of an encoding channel.
8313///
8314/// A data field to use as a unique key for data binding. When a visualization’s data is
8315/// updated, the key value will be used to match data elements to existing mark instances.
8316/// Use a key channel to enable object constancy for transitions over dynamic data.
8317#[derive(Debug, Clone, Serialize, Deserialize)]
8318#[serde(rename_all = "camelCase")]
8319#[derive(Default, Builder)]
8320#[builder(setter(into, strip_option))]
8321pub struct KeyClass {
8322    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
8323    /// `"max"`, `"count"`).
8324    ///
8325    /// __Default value:__ `undefined` (None)
8326    ///
8327    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
8328    /// documentation.
8329    #[serde(skip_serializing_if = "Option::is_none")]
8330    #[builder(default)]
8331    pub aggregate: Option<Aggregate>,
8332    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
8333    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
8334    /// middle of the band if set to `0.5`.
8335    #[serde(skip_serializing_if = "Option::is_none")]
8336    #[builder(default)]
8337    pub band_position: Option<f64>,
8338    /// A flag for binning a `quantitative` field, [an object defining binning
8339    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
8340    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
8341    /// (`"binned"`).
8342    ///
8343    /// - If `true`, default [binning
8344    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
8345    /// applied.
8346    ///
8347    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
8348    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
8349    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
8350    /// the axis ticks based on the bin step, you can also set the axis's
8351    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
8352    ///
8353    /// __Default value:__ `false`
8354    ///
8355    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
8356    #[serde(skip_serializing_if = "Option::is_none")]
8357    #[builder(default)]
8358    pub bin: Option<DescriptionBin>,
8359    /// __Required.__ A string defining the name of the field from which to pull a data value or
8360    /// an object defining iterated values from the
8361    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
8362    ///
8363    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
8364    ///
8365    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
8366    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
8367    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
8368    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
8369    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
8370    /// required if `aggregate` is `count`.
8371    #[serde(skip_serializing_if = "Option::is_none")]
8372    #[builder(default)]
8373    pub field: Option<Field>,
8374    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
8375    /// temporal field that gets casted as
8376    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
8377    ///
8378    /// __Default value:__ `undefined` (None)
8379    ///
8380    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
8381    /// documentation.
8382    #[serde(skip_serializing_if = "Option::is_none")]
8383    #[builder(default)]
8384    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
8385    /// A title for the field. If `null`, the title will be removed.
8386    ///
8387    /// __Default value:__  derived from the field's name and transformation function
8388    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
8389    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
8390    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
8391    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
8392    /// name.
8393    ///
8394    /// __Notes__:
8395    ///
8396    /// 1) You can customize the default field title format by providing the
8397    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
8398    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
8399    /// [`fieldTitle` function via the `compile` function's
8400    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
8401    ///
8402    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
8403    /// axis/header/legend title will be used.
8404    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
8405    #[builder(default)]
8406    pub title: RemovableValue<LegendText>,
8407    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
8408    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
8409    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
8410    ///
8411    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
8412    /// is required for a field if: (1) the field is not nominal and the field encoding has no
8413    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
8414    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
8415    /// or `timeUnit`.
8416    ///
8417    /// __Default value:__
8418    ///
8419    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
8420    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
8421    /// following criteria:
8422    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
8423    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
8424    /// `longitude` channel or (3) if the specified scale type is [a quantitative
8425    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
8426    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
8427    /// the specified scale type is a time or utc scale
8428    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
8429    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
8430    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
8431    /// `order`.
8432    ///
8433    /// 2) For a constant value in data domain (`datum`):
8434    /// - `"quantitative"` if the datum is a number
8435    /// - `"nominal"` if the datum is a string
8436    /// - `"temporal"` if the datum is [a date time
8437    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
8438    ///
8439    /// __Note:__
8440    /// - Data `type` describes the semantics of the data rather than the primitive data types
8441    /// (number, string, etc.). The same primitive data type can have different types of
8442    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
8443    /// data.
8444    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
8445    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
8446    /// `1552199579097`).
8447    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
8448    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
8449    /// (for using an ordinal bin
8450    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8451    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
8452    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
8453    /// [`"ordinal"` (for using an ordinal
8454    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8455    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
8456    /// the `type` property refers to the post-aggregation data type. For example, we can
8457    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
8458    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
8459    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
8460    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
8461    ///
8462    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
8463    #[serde(rename = "type")]
8464    #[serde(skip_serializing_if = "Option::is_none")]
8465    #[builder(default)]
8466    pub typed_field_def_type: Option<StandardType>,
8467}
8468
8469/// Latitude position of geographically projected marks.
8470///
8471/// Longitude position of geographically projected marks.
8472#[derive(Debug, Clone, Serialize, Deserialize)]
8473#[serde(rename_all = "camelCase")]
8474#[derive(Default, Builder)]
8475#[builder(setter(into, strip_option))]
8476pub struct LatitudeClass {
8477    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
8478    /// `"max"`, `"count"`).
8479    ///
8480    /// __Default value:__ `undefined` (None)
8481    ///
8482    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
8483    /// documentation.
8484    #[serde(skip_serializing_if = "Option::is_none")]
8485    #[builder(default)]
8486    pub aggregate: Option<Aggregate>,
8487    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
8488    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
8489    /// middle of the band if set to `0.5`.
8490    #[serde(skip_serializing_if = "Option::is_none")]
8491    #[builder(default)]
8492    pub band_position: Option<f64>,
8493    /// A flag for binning a `quantitative` field, [an object defining binning
8494    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
8495    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
8496    /// (`"binned"`).
8497    ///
8498    /// - If `true`, default [binning
8499    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
8500    /// applied.
8501    ///
8502    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
8503    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
8504    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
8505    /// the axis ticks based on the bin step, you can also set the axis's
8506    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
8507    ///
8508    /// __Default value:__ `false`
8509    ///
8510    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
8511    #[serde(skip_serializing_if = "Option::is_none")]
8512    #[builder(default)]
8513    pub bin: Option<serde_json::Value>,
8514    /// __Required.__ A string defining the name of the field from which to pull a data value or
8515    /// an object defining iterated values from the
8516    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
8517    ///
8518    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
8519    ///
8520    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
8521    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
8522    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
8523    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
8524    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
8525    /// required if `aggregate` is `count`.
8526    #[serde(skip_serializing_if = "Option::is_none")]
8527    #[builder(default)]
8528    pub field: Option<Field>,
8529    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
8530    /// temporal field that gets casted as
8531    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
8532    ///
8533    /// __Default value:__ `undefined` (None)
8534    ///
8535    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
8536    /// documentation.
8537    #[serde(skip_serializing_if = "Option::is_none")]
8538    #[builder(default)]
8539    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
8540    /// A title for the field. If `null`, the title will be removed.
8541    ///
8542    /// __Default value:__  derived from the field's name and transformation function
8543    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
8544    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
8545    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
8546    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
8547    /// name.
8548    ///
8549    /// __Notes__:
8550    ///
8551    /// 1) You can customize the default field title format by providing the
8552    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
8553    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
8554    /// [`fieldTitle` function via the `compile` function's
8555    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
8556    ///
8557    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
8558    /// axis/header/legend title will be used.
8559    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
8560    #[builder(default)]
8561    pub title: RemovableValue<LegendText>,
8562    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
8563    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
8564    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
8565    ///
8566    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
8567    /// is required for a field if: (1) the field is not nominal and the field encoding has no
8568    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
8569    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
8570    /// or `timeUnit`.
8571    ///
8572    /// __Default value:__
8573    ///
8574    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
8575    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
8576    /// following criteria:
8577    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
8578    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
8579    /// `longitude` channel or (3) if the specified scale type is [a quantitative
8580    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
8581    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
8582    /// the specified scale type is a time or utc scale
8583    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
8584    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
8585    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
8586    /// `order`.
8587    ///
8588    /// 2) For a constant value in data domain (`datum`):
8589    /// - `"quantitative"` if the datum is a number
8590    /// - `"nominal"` if the datum is a string
8591    /// - `"temporal"` if the datum is [a date time
8592    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
8593    ///
8594    /// __Note:__
8595    /// - Data `type` describes the semantics of the data rather than the primitive data types
8596    /// (number, string, etc.). The same primitive data type can have different types of
8597    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
8598    /// data.
8599    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
8600    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
8601    /// `1552199579097`).
8602    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
8603    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
8604    /// (for using an ordinal bin
8605    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8606    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
8607    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
8608    /// [`"ordinal"` (for using an ordinal
8609    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8610    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
8611    /// the `type` property refers to the post-aggregation data type. For example, we can
8612    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
8613    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
8614    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
8615    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
8616    ///
8617    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
8618    #[serde(rename = "type")]
8619    #[serde(skip_serializing_if = "Option::is_none")]
8620    #[builder(default)]
8621    pub lat_long_def_type: Option<Type>,
8622    /// A constant value in data domain.
8623    #[serde(skip_serializing_if = "Option::is_none")]
8624    #[builder(default)]
8625    pub datum: Option<PrimitiveValue>,
8626}
8627
8628/// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
8629/// `"rule"`.
8630///
8631/// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
8632/// and  `"rule"`.
8633///
8634/// The inner radius in pixels of arc marks.
8635///
8636/// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
8637/// values proceed clockwise.
8638///
8639/// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
8640///
8641/// The `value` of this channel can be a number or a string `"width"` for the width of the
8642/// plot.
8643///
8644/// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
8645///
8646/// The `value` of this channel can be a number or a string `"height"` for the height of the
8647/// plot.
8648///
8649/// A field definition of a secondary channel that shares a scale with another primary
8650/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
8651///
8652/// Definition object for a constant value (primitive value or gradient definition) of an
8653/// encoding channel.
8654#[derive(Debug, Clone, Serialize, Deserialize)]
8655#[serde(rename_all = "camelCase")]
8656#[derive(Default, Builder)]
8657#[builder(setter(into, strip_option))]
8658pub struct Latitude2Class {
8659    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
8660    /// `"max"`, `"count"`).
8661    ///
8662    /// __Default value:__ `undefined` (None)
8663    ///
8664    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
8665    /// documentation.
8666    #[serde(skip_serializing_if = "Option::is_none")]
8667    #[builder(default)]
8668    pub aggregate: Option<Aggregate>,
8669    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
8670    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
8671    /// middle of the band if set to `0.5`.
8672    #[serde(skip_serializing_if = "Option::is_none")]
8673    #[builder(default)]
8674    pub band_position: Option<f64>,
8675    /// A flag for binning a `quantitative` field, [an object defining binning
8676    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
8677    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
8678    /// (`"binned"`).
8679    ///
8680    /// - If `true`, default [binning
8681    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
8682    /// applied.
8683    ///
8684    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
8685    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
8686    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
8687    /// the axis ticks based on the bin step, you can also set the axis's
8688    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
8689    ///
8690    /// __Default value:__ `false`
8691    ///
8692    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
8693    #[serde(skip_serializing_if = "Option::is_none")]
8694    #[builder(default)]
8695    pub bin: Option<serde_json::Value>,
8696    /// __Required.__ A string defining the name of the field from which to pull a data value or
8697    /// an object defining iterated values from the
8698    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
8699    ///
8700    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
8701    ///
8702    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
8703    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
8704    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
8705    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
8706    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
8707    /// required if `aggregate` is `count`.
8708    #[serde(skip_serializing_if = "Option::is_none")]
8709    #[builder(default)]
8710    pub field: Option<Field>,
8711    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
8712    /// temporal field that gets casted as
8713    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
8714    ///
8715    /// __Default value:__ `undefined` (None)
8716    ///
8717    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
8718    /// documentation.
8719    #[serde(skip_serializing_if = "Option::is_none")]
8720    #[builder(default)]
8721    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
8722    /// A title for the field. If `null`, the title will be removed.
8723    ///
8724    /// __Default value:__  derived from the field's name and transformation function
8725    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
8726    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
8727    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
8728    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
8729    /// name.
8730    ///
8731    /// __Notes__:
8732    ///
8733    /// 1) You can customize the default field title format by providing the
8734    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
8735    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
8736    /// [`fieldTitle` function via the `compile` function's
8737    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
8738    ///
8739    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
8740    /// axis/header/legend title will be used.
8741    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
8742    #[builder(default)]
8743    pub title: RemovableValue<LegendText>,
8744    /// A constant value in data domain.
8745    #[serde(skip_serializing_if = "Option::is_none")]
8746    #[builder(default)]
8747    pub datum: Option<PrimitiveValue>,
8748    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
8749    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
8750    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
8751    ///
8752    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
8753    /// is required for a field if: (1) the field is not nominal and the field encoding has no
8754    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
8755    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
8756    /// or `timeUnit`.
8757    ///
8758    /// __Default value:__
8759    ///
8760    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
8761    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
8762    /// following criteria:
8763    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
8764    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
8765    /// `longitude` channel or (3) if the specified scale type is [a quantitative
8766    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
8767    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
8768    /// the specified scale type is a time or utc scale
8769    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
8770    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
8771    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
8772    /// `order`.
8773    ///
8774    /// 2) For a constant value in data domain (`datum`):
8775    /// - `"quantitative"` if the datum is a number
8776    /// - `"nominal"` if the datum is a string
8777    /// - `"temporal"` if the datum is [a date time
8778    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
8779    ///
8780    /// __Note:__
8781    /// - Data `type` describes the semantics of the data rather than the primitive data types
8782    /// (number, string, etc.). The same primitive data type can have different types of
8783    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
8784    /// data.
8785    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
8786    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
8787    /// `1552199579097`).
8788    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
8789    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
8790    /// (for using an ordinal bin
8791    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8792    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
8793    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
8794    /// [`"ordinal"` (for using an ordinal
8795    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8796    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
8797    /// the `type` property refers to the post-aggregation data type. For example, we can
8798    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
8799    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
8800    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
8801    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
8802    ///
8803    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
8804    #[serde(rename = "type")]
8805    #[serde(skip_serializing_if = "Option::is_none")]
8806    #[builder(default)]
8807    pub position2_def_type: Option<Type>,
8808    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
8809    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
8810    /// between `0` to `1` for opacity).
8811    #[serde(skip_serializing_if = "Option::is_none")]
8812    #[builder(default)]
8813    pub value: Option<Latitude2Value>,
8814}
8815
8816#[derive(Debug, Clone, Serialize, Deserialize)]
8817#[serde(untagged)]
8818#[derive(From)]
8819pub enum Latitude2Value {
8820    BackgroundExprRef(BackgroundExprRef),
8821    Double(f64),
8822    Enum(ValueEnum),
8823}
8824
8825#[derive(Debug, Clone, Serialize, Deserialize)]
8826#[serde(rename_all = "snake_case")]
8827pub enum ValueEnum {
8828    Height,
8829    Width,
8830}
8831
8832/// Latitude position of geographically projected marks.
8833///
8834/// Longitude position of geographically projected marks.
8835#[derive(Debug, Clone, Serialize, Deserialize)]
8836#[serde(rename_all = "camelCase")]
8837#[derive(Default, Builder)]
8838#[builder(setter(into, strip_option))]
8839pub struct LongitudeClass {
8840    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
8841    /// `"max"`, `"count"`).
8842    ///
8843    /// __Default value:__ `undefined` (None)
8844    ///
8845    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
8846    /// documentation.
8847    #[serde(skip_serializing_if = "Option::is_none")]
8848    #[builder(default)]
8849    pub aggregate: Option<Aggregate>,
8850    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
8851    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
8852    /// middle of the band if set to `0.5`.
8853    #[serde(skip_serializing_if = "Option::is_none")]
8854    #[builder(default)]
8855    pub band_position: Option<f64>,
8856    /// A flag for binning a `quantitative` field, [an object defining binning
8857    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
8858    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
8859    /// (`"binned"`).
8860    ///
8861    /// - If `true`, default [binning
8862    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
8863    /// applied.
8864    ///
8865    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
8866    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
8867    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
8868    /// the axis ticks based on the bin step, you can also set the axis's
8869    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
8870    ///
8871    /// __Default value:__ `false`
8872    ///
8873    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
8874    #[serde(skip_serializing_if = "Option::is_none")]
8875    #[builder(default)]
8876    pub bin: Option<serde_json::Value>,
8877    /// __Required.__ A string defining the name of the field from which to pull a data value or
8878    /// an object defining iterated values from the
8879    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
8880    ///
8881    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
8882    ///
8883    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
8884    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
8885    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
8886    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
8887    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
8888    /// required if `aggregate` is `count`.
8889    #[serde(skip_serializing_if = "Option::is_none")]
8890    #[builder(default)]
8891    pub field: Option<Field>,
8892    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
8893    /// temporal field that gets casted as
8894    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
8895    ///
8896    /// __Default value:__ `undefined` (None)
8897    ///
8898    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
8899    /// documentation.
8900    #[serde(skip_serializing_if = "Option::is_none")]
8901    #[builder(default)]
8902    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
8903    /// A title for the field. If `null`, the title will be removed.
8904    ///
8905    /// __Default value:__  derived from the field's name and transformation function
8906    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
8907    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
8908    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
8909    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
8910    /// name.
8911    ///
8912    /// __Notes__:
8913    ///
8914    /// 1) You can customize the default field title format by providing the
8915    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
8916    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
8917    /// [`fieldTitle` function via the `compile` function's
8918    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
8919    ///
8920    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
8921    /// axis/header/legend title will be used.
8922    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
8923    #[builder(default)]
8924    pub title: RemovableValue<LegendText>,
8925    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
8926    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
8927    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
8928    ///
8929    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
8930    /// is required for a field if: (1) the field is not nominal and the field encoding has no
8931    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
8932    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
8933    /// or `timeUnit`.
8934    ///
8935    /// __Default value:__
8936    ///
8937    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
8938    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
8939    /// following criteria:
8940    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
8941    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
8942    /// `longitude` channel or (3) if the specified scale type is [a quantitative
8943    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
8944    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
8945    /// the specified scale type is a time or utc scale
8946    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
8947    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
8948    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
8949    /// `order`.
8950    ///
8951    /// 2) For a constant value in data domain (`datum`):
8952    /// - `"quantitative"` if the datum is a number
8953    /// - `"nominal"` if the datum is a string
8954    /// - `"temporal"` if the datum is [a date time
8955    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
8956    ///
8957    /// __Note:__
8958    /// - Data `type` describes the semantics of the data rather than the primitive data types
8959    /// (number, string, etc.). The same primitive data type can have different types of
8960    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
8961    /// data.
8962    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
8963    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
8964    /// `1552199579097`).
8965    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
8966    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
8967    /// (for using an ordinal bin
8968    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8969    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
8970    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
8971    /// [`"ordinal"` (for using an ordinal
8972    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
8973    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
8974    /// the `type` property refers to the post-aggregation data type. For example, we can
8975    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
8976    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
8977    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
8978    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
8979    ///
8980    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
8981    #[serde(rename = "type")]
8982    #[serde(skip_serializing_if = "Option::is_none")]
8983    #[builder(default)]
8984    pub lat_long_def_type: Option<Type>,
8985    /// A constant value in data domain.
8986    #[serde(skip_serializing_if = "Option::is_none")]
8987    #[builder(default)]
8988    pub datum: Option<PrimitiveValue>,
8989}
8990
8991/// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
8992/// `"rule"`.
8993///
8994/// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
8995/// and  `"rule"`.
8996///
8997/// The inner radius in pixels of arc marks.
8998///
8999/// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
9000/// values proceed clockwise.
9001///
9002/// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
9003///
9004/// The `value` of this channel can be a number or a string `"width"` for the width of the
9005/// plot.
9006///
9007/// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
9008///
9009/// The `value` of this channel can be a number or a string `"height"` for the height of the
9010/// plot.
9011///
9012/// A field definition of a secondary channel that shares a scale with another primary
9013/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
9014///
9015/// Definition object for a constant value (primitive value or gradient definition) of an
9016/// encoding channel.
9017#[derive(Debug, Clone, Serialize, Deserialize)]
9018#[serde(rename_all = "camelCase")]
9019#[derive(Default, Builder)]
9020#[builder(setter(into, strip_option))]
9021pub struct Longitude2Class {
9022    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
9023    /// `"max"`, `"count"`).
9024    ///
9025    /// __Default value:__ `undefined` (None)
9026    ///
9027    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
9028    /// documentation.
9029    #[serde(skip_serializing_if = "Option::is_none")]
9030    #[builder(default)]
9031    pub aggregate: Option<Aggregate>,
9032    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
9033    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
9034    /// middle of the band if set to `0.5`.
9035    #[serde(skip_serializing_if = "Option::is_none")]
9036    #[builder(default)]
9037    pub band_position: Option<f64>,
9038    /// A flag for binning a `quantitative` field, [an object defining binning
9039    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
9040    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
9041    /// (`"binned"`).
9042    ///
9043    /// - If `true`, default [binning
9044    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
9045    /// applied.
9046    ///
9047    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
9048    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
9049    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
9050    /// the axis ticks based on the bin step, you can also set the axis's
9051    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
9052    ///
9053    /// __Default value:__ `false`
9054    ///
9055    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
9056    #[serde(skip_serializing_if = "Option::is_none")]
9057    #[builder(default)]
9058    pub bin: Option<serde_json::Value>,
9059    /// __Required.__ A string defining the name of the field from which to pull a data value or
9060    /// an object defining iterated values from the
9061    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
9062    ///
9063    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
9064    ///
9065    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
9066    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
9067    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
9068    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
9069    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
9070    /// required if `aggregate` is `count`.
9071    #[serde(skip_serializing_if = "Option::is_none")]
9072    #[builder(default)]
9073    pub field: Option<Field>,
9074    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
9075    /// temporal field that gets casted as
9076    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
9077    ///
9078    /// __Default value:__ `undefined` (None)
9079    ///
9080    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
9081    /// documentation.
9082    #[serde(skip_serializing_if = "Option::is_none")]
9083    #[builder(default)]
9084    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
9085    /// A title for the field. If `null`, the title will be removed.
9086    ///
9087    /// __Default value:__  derived from the field's name and transformation function
9088    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
9089    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
9090    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
9091    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
9092    /// name.
9093    ///
9094    /// __Notes__:
9095    ///
9096    /// 1) You can customize the default field title format by providing the
9097    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
9098    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
9099    /// [`fieldTitle` function via the `compile` function's
9100    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
9101    ///
9102    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
9103    /// axis/header/legend title will be used.
9104    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9105    #[builder(default)]
9106    pub title: RemovableValue<LegendText>,
9107    /// A constant value in data domain.
9108    #[serde(skip_serializing_if = "Option::is_none")]
9109    #[builder(default)]
9110    pub datum: Option<PrimitiveValue>,
9111    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
9112    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
9113    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
9114    ///
9115    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
9116    /// is required for a field if: (1) the field is not nominal and the field encoding has no
9117    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
9118    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
9119    /// or `timeUnit`.
9120    ///
9121    /// __Default value:__
9122    ///
9123    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
9124    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
9125    /// following criteria:
9126    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
9127    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
9128    /// `longitude` channel or (3) if the specified scale type is [a quantitative
9129    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
9130    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
9131    /// the specified scale type is a time or utc scale
9132    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
9133    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
9134    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
9135    /// `order`.
9136    ///
9137    /// 2) For a constant value in data domain (`datum`):
9138    /// - `"quantitative"` if the datum is a number
9139    /// - `"nominal"` if the datum is a string
9140    /// - `"temporal"` if the datum is [a date time
9141    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
9142    ///
9143    /// __Note:__
9144    /// - Data `type` describes the semantics of the data rather than the primitive data types
9145    /// (number, string, etc.). The same primitive data type can have different types of
9146    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
9147    /// data.
9148    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
9149    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
9150    /// `1552199579097`).
9151    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
9152    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
9153    /// (for using an ordinal bin
9154    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
9155    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
9156    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
9157    /// [`"ordinal"` (for using an ordinal
9158    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
9159    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
9160    /// the `type` property refers to the post-aggregation data type. For example, we can
9161    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
9162    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
9163    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
9164    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
9165    ///
9166    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
9167    #[serde(rename = "type")]
9168    #[serde(skip_serializing_if = "Option::is_none")]
9169    #[builder(default)]
9170    pub position2_def_type: Option<Type>,
9171    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
9172    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
9173    /// between `0` to `1` for opacity).
9174    #[serde(skip_serializing_if = "Option::is_none")]
9175    #[builder(default)]
9176    pub value: Option<Latitude2Value>,
9177}
9178
9179/// Rotation angle of point and text marks.
9180///
9181/// Fill opacity of the marks.
9182///
9183/// __Default value:__ If undefined, the default opacity depends on [mark
9184/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
9185/// property.
9186///
9187/// Opacity of the marks.
9188///
9189/// __Default value:__ If undefined, the default opacity depends on [mark
9190/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
9191/// property.
9192///
9193/// Size of the mark.
9194/// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
9195/// - For `"bar"` and `"tick"` – the bar and tick's size.
9196/// - For `"text"` – the text's font size.
9197/// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
9198/// line with varying size)
9199///
9200/// Stroke opacity of the marks.
9201///
9202/// __Default value:__ If undefined, the default opacity depends on [mark
9203/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
9204/// property.
9205///
9206/// Stroke width of the marks.
9207///
9208/// __Default value:__ If undefined, the default stroke width depends on [mark
9209/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
9210/// property.
9211///
9212/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
9213#[derive(Debug, Clone, Serialize, Deserialize)]
9214#[serde(rename_all = "camelCase")]
9215#[derive(Default, Builder)]
9216#[builder(setter(into, strip_option))]
9217pub struct OpacityClass {
9218    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
9219    /// `"max"`, `"count"`).
9220    ///
9221    /// __Default value:__ `undefined` (None)
9222    ///
9223    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
9224    /// documentation.
9225    #[serde(skip_serializing_if = "Option::is_none")]
9226    #[builder(default)]
9227    pub aggregate: Option<Aggregate>,
9228    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
9229    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
9230    /// middle of the band if set to `0.5`.
9231    #[serde(skip_serializing_if = "Option::is_none")]
9232    #[builder(default)]
9233    pub band_position: Option<f64>,
9234    /// A flag for binning a `quantitative` field, [an object defining binning
9235    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
9236    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
9237    /// (`"binned"`).
9238    ///
9239    /// - If `true`, default [binning
9240    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
9241    /// applied.
9242    ///
9243    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
9244    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
9245    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
9246    /// the axis ticks based on the bin step, you can also set the axis's
9247    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
9248    ///
9249    /// __Default value:__ `false`
9250    ///
9251    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
9252    #[serde(skip_serializing_if = "Option::is_none")]
9253    #[builder(default)]
9254    pub bin: Option<AngleBin>,
9255    /// One or more value definition(s) with [a parameter or a test
9256    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
9257    ///
9258    /// __Note:__ A field definition's `condition` property can only contain [conditional value
9259    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
9260    /// only allows at most one encoded field per encoding channel.
9261    ///
9262    /// A field definition or one or more value definition(s) with a parameter predicate.
9263    #[serde(skip_serializing_if = "Option::is_none")]
9264    #[builder(default)]
9265    pub condition: Option<AngleCondition>,
9266    /// __Required.__ A string defining the name of the field from which to pull a data value or
9267    /// an object defining iterated values from the
9268    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
9269    ///
9270    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
9271    ///
9272    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
9273    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
9274    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
9275    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
9276    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
9277    /// required if `aggregate` is `count`.
9278    #[serde(skip_serializing_if = "Option::is_none")]
9279    #[builder(default)]
9280    pub field: Option<Field>,
9281    /// An object defining properties of the legend. If `null`, the legend for the encoding
9282    /// channel will be removed.
9283    ///
9284    /// __Default value:__ If undefined, default [legend
9285    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
9286    ///
9287    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
9288    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9289    #[builder(default)]
9290    pub legend: RemovableValue<Legend>,
9291    /// An object defining properties of the channel's scale, which is the function that
9292    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
9293    /// (pixels, colors, sizes) of the encoding channels.
9294    ///
9295    /// If `null`, the scale will be [disabled and the data value will be directly
9296    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
9297    ///
9298    /// __Default value:__ If undefined, default [scale
9299    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
9300    ///
9301    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
9302    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9303    #[builder(default)]
9304    pub scale: RemovableValue<Scale>,
9305    /// Sort order for the encoded field.
9306    ///
9307    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
9308    /// `"descending"`.
9309    ///
9310    /// For discrete fields, `sort` can be one of the following:
9311    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
9312    /// JavaScript.
9313    /// - [A string indicating an encoding channel name to sort
9314    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
9315    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
9316    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
9317    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
9318    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
9319    /// "descending"}`.
9320    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
9321    /// for sorting by another field.
9322    /// - [An array specifying the field values in preferred
9323    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
9324    /// sort order will obey the values in the array, followed by any unspecified values in their
9325    /// original order. For discrete time field, values in the sort array can be [date-time
9326    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
9327    /// the values can be the month or day names (case insensitive) or their 3-letter initials
9328    /// (e.g., `"Mon"`, `"Tue"`).
9329    /// - `null` indicating no sort.
9330    ///
9331    /// __Default value:__ `"ascending"`
9332    ///
9333    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
9334    ///
9335    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
9336    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9337    #[builder(default)]
9338    pub sort: RemovableValue<SortUnion>,
9339    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
9340    /// temporal field that gets casted as
9341    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
9342    ///
9343    /// __Default value:__ `undefined` (None)
9344    ///
9345    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
9346    /// documentation.
9347    #[serde(skip_serializing_if = "Option::is_none")]
9348    #[builder(default)]
9349    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
9350    /// A title for the field. If `null`, the title will be removed.
9351    ///
9352    /// __Default value:__  derived from the field's name and transformation function
9353    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
9354    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
9355    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
9356    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
9357    /// name.
9358    ///
9359    /// __Notes__:
9360    ///
9361    /// 1) You can customize the default field title format by providing the
9362    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
9363    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
9364    /// [`fieldTitle` function via the `compile` function's
9365    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
9366    ///
9367    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
9368    /// axis/header/legend title will be used.
9369    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9370    #[builder(default)]
9371    pub title: RemovableValue<LegendText>,
9372    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
9373    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
9374    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
9375    ///
9376    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
9377    /// is required for a field if: (1) the field is not nominal and the field encoding has no
9378    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
9379    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
9380    /// or `timeUnit`.
9381    ///
9382    /// __Default value:__
9383    ///
9384    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
9385    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
9386    /// following criteria:
9387    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
9388    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
9389    /// `longitude` channel or (3) if the specified scale type is [a quantitative
9390    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
9391    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
9392    /// the specified scale type is a time or utc scale
9393    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
9394    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
9395    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
9396    /// `order`.
9397    ///
9398    /// 2) For a constant value in data domain (`datum`):
9399    /// - `"quantitative"` if the datum is a number
9400    /// - `"nominal"` if the datum is a string
9401    /// - `"temporal"` if the datum is [a date time
9402    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
9403    ///
9404    /// __Note:__
9405    /// - Data `type` describes the semantics of the data rather than the primitive data types
9406    /// (number, string, etc.). The same primitive data type can have different types of
9407    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
9408    /// data.
9409    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
9410    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
9411    /// `1552199579097`).
9412    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
9413    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
9414    /// (for using an ordinal bin
9415    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
9416    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
9417    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
9418    /// [`"ordinal"` (for using an ordinal
9419    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
9420    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
9421    /// the `type` property refers to the post-aggregation data type. For example, we can
9422    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
9423    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
9424    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
9425    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
9426    ///
9427    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
9428    #[serde(rename = "type")]
9429    #[serde(skip_serializing_if = "Option::is_none")]
9430    #[builder(default)]
9431    pub mark_prop_def_number_type: Option<Type>,
9432    /// A constant value in data domain.
9433    #[serde(skip_serializing_if = "Option::is_none")]
9434    #[builder(default)]
9435    pub datum: Option<PrimitiveValue>,
9436    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
9437    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
9438    /// between `0` to `1` for opacity).
9439    #[serde(skip_serializing_if = "Option::is_none")]
9440    #[builder(default)]
9441    pub value: Option<CornerRadiusUnion>,
9442}
9443
9444#[derive(Debug, Clone, Serialize, Deserialize)]
9445#[serde(untagged)]
9446#[derive(From)]
9447pub enum Order {
9448    OrderDef(OrderDef),
9449    OrderFieldDefArray(Vec<OrderFieldDef>),
9450}
9451
9452#[derive(Debug, Clone, Serialize, Deserialize)]
9453#[serde(rename_all = "camelCase")]
9454#[derive(Default, Builder)]
9455#[builder(setter(into, strip_option))]
9456pub struct OrderFieldDef {
9457    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
9458    /// `"max"`, `"count"`).
9459    ///
9460    /// __Default value:__ `undefined` (None)
9461    ///
9462    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
9463    /// documentation.
9464    #[serde(skip_serializing_if = "Option::is_none")]
9465    #[builder(default)]
9466    pub aggregate: Option<Aggregate>,
9467    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
9468    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
9469    /// middle of the band if set to `0.5`.
9470    #[serde(skip_serializing_if = "Option::is_none")]
9471    #[builder(default)]
9472    pub band_position: Option<f64>,
9473    /// A flag for binning a `quantitative` field, [an object defining binning
9474    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
9475    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
9476    /// (`"binned"`).
9477    ///
9478    /// - If `true`, default [binning
9479    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
9480    /// applied.
9481    ///
9482    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
9483    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
9484    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
9485    /// the axis ticks based on the bin step, you can also set the axis's
9486    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
9487    ///
9488    /// __Default value:__ `false`
9489    ///
9490    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
9491    #[serde(skip_serializing_if = "Option::is_none")]
9492    #[builder(default)]
9493    pub bin: Option<DescriptionBin>,
9494    /// __Required.__ A string defining the name of the field from which to pull a data value or
9495    /// an object defining iterated values from the
9496    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
9497    ///
9498    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
9499    ///
9500    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
9501    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
9502    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
9503    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
9504    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
9505    /// required if `aggregate` is `count`.
9506    #[serde(skip_serializing_if = "Option::is_none")]
9507    #[builder(default)]
9508    pub field: Option<Field>,
9509    /// The sort order. One of `"ascending"` (default) or `"descending"`.
9510    #[serde(skip_serializing_if = "Option::is_none")]
9511    #[builder(default)]
9512    pub sort: Option<SortOrder>,
9513    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
9514    /// temporal field that gets casted as
9515    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
9516    ///
9517    /// __Default value:__ `undefined` (None)
9518    ///
9519    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
9520    /// documentation.
9521    #[serde(skip_serializing_if = "Option::is_none")]
9522    #[builder(default)]
9523    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
9524    /// A title for the field. If `null`, the title will be removed.
9525    ///
9526    /// __Default value:__  derived from the field's name and transformation function
9527    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
9528    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
9529    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
9530    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
9531    /// name.
9532    ///
9533    /// __Notes__:
9534    ///
9535    /// 1) You can customize the default field title format by providing the
9536    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
9537    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
9538    /// [`fieldTitle` function via the `compile` function's
9539    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
9540    ///
9541    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
9542    /// axis/header/legend title will be used.
9543    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9544    #[builder(default)]
9545    pub title: RemovableValue<LegendText>,
9546    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
9547    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
9548    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
9549    ///
9550    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
9551    /// is required for a field if: (1) the field is not nominal and the field encoding has no
9552    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
9553    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
9554    /// or `timeUnit`.
9555    ///
9556    /// __Default value:__
9557    ///
9558    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
9559    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
9560    /// following criteria:
9561    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
9562    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
9563    /// `longitude` channel or (3) if the specified scale type is [a quantitative
9564    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
9565    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
9566    /// the specified scale type is a time or utc scale
9567    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
9568    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
9569    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
9570    /// `order`.
9571    ///
9572    /// 2) For a constant value in data domain (`datum`):
9573    /// - `"quantitative"` if the datum is a number
9574    /// - `"nominal"` if the datum is a string
9575    /// - `"temporal"` if the datum is [a date time
9576    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
9577    ///
9578    /// __Note:__
9579    /// - Data `type` describes the semantics of the data rather than the primitive data types
9580    /// (number, string, etc.). The same primitive data type can have different types of
9581    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
9582    /// data.
9583    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
9584    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
9585    /// `1552199579097`).
9586    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
9587    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
9588    /// (for using an ordinal bin
9589    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
9590    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
9591    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
9592    /// [`"ordinal"` (for using an ordinal
9593    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
9594    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
9595    /// the `type` property refers to the post-aggregation data type. For example, we can
9596    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
9597    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
9598    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
9599    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
9600    ///
9601    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
9602    #[serde(rename = "type")]
9603    #[serde(skip_serializing_if = "Option::is_none")]
9604    #[builder(default)]
9605    pub order_field_def_type: Option<StandardType>,
9606}
9607
9608#[derive(Debug, Clone, Serialize, Deserialize)]
9609#[serde(rename_all = "camelCase")]
9610#[derive(Default, Builder)]
9611#[builder(setter(into, strip_option))]
9612pub struct OrderDef {
9613    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
9614    /// `"max"`, `"count"`).
9615    ///
9616    /// __Default value:__ `undefined` (None)
9617    ///
9618    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
9619    /// documentation.
9620    #[serde(skip_serializing_if = "Option::is_none")]
9621    #[builder(default)]
9622    pub aggregate: Option<Aggregate>,
9623    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
9624    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
9625    /// middle of the band if set to `0.5`.
9626    #[serde(skip_serializing_if = "Option::is_none")]
9627    #[builder(default)]
9628    pub band_position: Option<f64>,
9629    /// A flag for binning a `quantitative` field, [an object defining binning
9630    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
9631    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
9632    /// (`"binned"`).
9633    ///
9634    /// - If `true`, default [binning
9635    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
9636    /// applied.
9637    ///
9638    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
9639    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
9640    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
9641    /// the axis ticks based on the bin step, you can also set the axis's
9642    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
9643    ///
9644    /// __Default value:__ `false`
9645    ///
9646    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
9647    #[serde(skip_serializing_if = "Option::is_none")]
9648    #[builder(default)]
9649    pub bin: Option<DescriptionBin>,
9650    /// __Required.__ A string defining the name of the field from which to pull a data value or
9651    /// an object defining iterated values from the
9652    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
9653    ///
9654    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
9655    ///
9656    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
9657    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
9658    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
9659    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
9660    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
9661    /// required if `aggregate` is `count`.
9662    #[serde(skip_serializing_if = "Option::is_none")]
9663    #[builder(default)]
9664    pub field: Option<Field>,
9665    /// The sort order. One of `"ascending"` (default) or `"descending"`.
9666    #[serde(skip_serializing_if = "Option::is_none")]
9667    #[builder(default)]
9668    pub sort: Option<SortOrder>,
9669    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
9670    /// temporal field that gets casted as
9671    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
9672    ///
9673    /// __Default value:__ `undefined` (None)
9674    ///
9675    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
9676    /// documentation.
9677    #[serde(skip_serializing_if = "Option::is_none")]
9678    #[builder(default)]
9679    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
9680    /// A title for the field. If `null`, the title will be removed.
9681    ///
9682    /// __Default value:__  derived from the field's name and transformation function
9683    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
9684    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
9685    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
9686    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
9687    /// name.
9688    ///
9689    /// __Notes__:
9690    ///
9691    /// 1) You can customize the default field title format by providing the
9692    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
9693    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
9694    /// [`fieldTitle` function via the `compile` function's
9695    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
9696    ///
9697    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
9698    /// axis/header/legend title will be used.
9699    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9700    #[builder(default)]
9701    pub title: RemovableValue<LegendText>,
9702    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
9703    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
9704    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
9705    ///
9706    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
9707    /// is required for a field if: (1) the field is not nominal and the field encoding has no
9708    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
9709    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
9710    /// or `timeUnit`.
9711    ///
9712    /// __Default value:__
9713    ///
9714    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
9715    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
9716    /// following criteria:
9717    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
9718    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
9719    /// `longitude` channel or (3) if the specified scale type is [a quantitative
9720    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
9721    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
9722    /// the specified scale type is a time or utc scale
9723    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
9724    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
9725    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
9726    /// `order`.
9727    ///
9728    /// 2) For a constant value in data domain (`datum`):
9729    /// - `"quantitative"` if the datum is a number
9730    /// - `"nominal"` if the datum is a string
9731    /// - `"temporal"` if the datum is [a date time
9732    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
9733    ///
9734    /// __Note:__
9735    /// - Data `type` describes the semantics of the data rather than the primitive data types
9736    /// (number, string, etc.). The same primitive data type can have different types of
9737    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
9738    /// data.
9739    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
9740    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
9741    /// `1552199579097`).
9742    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
9743    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
9744    /// (for using an ordinal bin
9745    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
9746    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
9747    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
9748    /// [`"ordinal"` (for using an ordinal
9749    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
9750    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
9751    /// the `type` property refers to the post-aggregation data type. For example, we can
9752    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
9753    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
9754    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
9755    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
9756    ///
9757    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
9758    #[serde(rename = "type")]
9759    #[serde(skip_serializing_if = "Option::is_none")]
9760    #[builder(default)]
9761    pub order_def_type: Option<StandardType>,
9762    /// One or more value definition(s) with [a parameter or a test
9763    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
9764    ///
9765    /// __Note:__ A field definition's `condition` property can only contain [conditional value
9766    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
9767    /// only allows at most one encoded field per encoding channel.
9768    #[serde(skip_serializing_if = "Option::is_none")]
9769    #[builder(default)]
9770    pub condition: Option<OrderFieldDefCondition>,
9771    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
9772    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
9773    /// between `0` to `1` for opacity).
9774    #[serde(skip_serializing_if = "Option::is_none")]
9775    #[builder(default)]
9776    pub value: Option<CornerRadiusUnion>,
9777}
9778
9779/// One or more value definition(s) with [a parameter or a test
9780/// predicate](https://vega.github.io/vega-lite/docs/condition.html).
9781///
9782/// __Note:__ A field definition's `condition` property can only contain [conditional value
9783/// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
9784/// only allows at most one encoded field per encoding channel.
9785#[derive(Debug, Clone, Serialize, Deserialize)]
9786#[serde(untagged)]
9787#[derive(From)]
9788pub enum OrderFieldDefCondition {
9789    ConditionalPValueDefNumber(ConditionalPValueDefNumber),
9790    ConditionalValueDefNumberArray(Vec<ConditionalValueDefNumber>),
9791}
9792
9793#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
9794#[builder(setter(into, strip_option))]
9795pub struct ConditionalValueDefNumber {
9796    /// Predicate for triggering the condition
9797    #[serde(skip_serializing_if = "Option::is_none")]
9798    #[builder(default)]
9799    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
9800    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
9801    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
9802    /// between `0` to `1` for opacity).
9803    #[serde(skip_serializing_if = "Option::is_none")]
9804    #[builder(default)]
9805    pub value: Option<f64>,
9806    /// For selection parameters, the predicate of empty selections returns true by default.
9807    /// Override this behavior, by setting this property `empty: false`.
9808    #[serde(skip_serializing_if = "Option::is_none")]
9809    #[builder(default)]
9810    pub empty: Option<bool>,
9811    /// Filter using a parameter name.
9812    #[serde(skip_serializing_if = "Option::is_none")]
9813    #[builder(default)]
9814    pub param: Option<String>,
9815}
9816
9817#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
9818#[builder(setter(into, strip_option))]
9819pub struct ConditionalPValueDefNumber {
9820    /// Predicate for triggering the condition
9821    #[serde(skip_serializing_if = "Option::is_none")]
9822    #[builder(default)]
9823    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
9824    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
9825    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
9826    /// between `0` to `1` for opacity).
9827    #[serde(skip_serializing_if = "Option::is_none")]
9828    #[builder(default)]
9829    pub value: Option<f64>,
9830    /// For selection parameters, the predicate of empty selections returns true by default.
9831    /// Override this behavior, by setting this property `empty: false`.
9832    #[serde(skip_serializing_if = "Option::is_none")]
9833    #[builder(default)]
9834    pub empty: Option<bool>,
9835    /// Filter using a parameter name.
9836    #[serde(skip_serializing_if = "Option::is_none")]
9837    #[builder(default)]
9838    pub param: Option<String>,
9839}
9840
9841/// The outer radius in pixels of arc marks.
9842///
9843/// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
9844/// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
9845/// clockwise.)
9846///
9847/// - For text marks, polar coordinate angle in radians.
9848///
9849/// Definition object for a constant value (primitive value or gradient definition) of an
9850/// encoding channel.
9851#[derive(Debug, Clone, Serialize, Deserialize)]
9852#[serde(rename_all = "camelCase")]
9853#[derive(Default, Builder)]
9854#[builder(setter(into, strip_option))]
9855pub struct RadiusClass {
9856    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
9857    /// `"max"`, `"count"`).
9858    ///
9859    /// __Default value:__ `undefined` (None)
9860    ///
9861    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
9862    /// documentation.
9863    #[serde(skip_serializing_if = "Option::is_none")]
9864    #[builder(default)]
9865    pub aggregate: Option<Aggregate>,
9866    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
9867    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
9868    /// middle of the band if set to `0.5`.
9869    #[serde(skip_serializing_if = "Option::is_none")]
9870    #[builder(default)]
9871    pub band_position: Option<f64>,
9872    /// A flag for binning a `quantitative` field, [an object defining binning
9873    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
9874    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
9875    /// (`"binned"`).
9876    ///
9877    /// - If `true`, default [binning
9878    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
9879    /// applied.
9880    ///
9881    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
9882    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
9883    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
9884    /// the axis ticks based on the bin step, you can also set the axis's
9885    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
9886    ///
9887    /// __Default value:__ `false`
9888    ///
9889    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
9890    #[serde(skip_serializing_if = "Option::is_none")]
9891    #[builder(default)]
9892    pub bin: Option<DescriptionBin>,
9893    /// __Required.__ A string defining the name of the field from which to pull a data value or
9894    /// an object defining iterated values from the
9895    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
9896    ///
9897    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
9898    ///
9899    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
9900    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
9901    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
9902    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
9903    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
9904    /// required if `aggregate` is `count`.
9905    #[serde(skip_serializing_if = "Option::is_none")]
9906    #[builder(default)]
9907    pub field: Option<Field>,
9908    /// An object defining properties of the channel's scale, which is the function that
9909    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
9910    /// (pixels, colors, sizes) of the encoding channels.
9911    ///
9912    /// If `null`, the scale will be [disabled and the data value will be directly
9913    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
9914    ///
9915    /// __Default value:__ If undefined, default [scale
9916    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
9917    ///
9918    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
9919    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9920    #[builder(default)]
9921    pub scale: RemovableValue<Scale>,
9922    /// Sort order for the encoded field.
9923    ///
9924    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
9925    /// `"descending"`.
9926    ///
9927    /// For discrete fields, `sort` can be one of the following:
9928    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
9929    /// JavaScript.
9930    /// - [A string indicating an encoding channel name to sort
9931    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
9932    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
9933    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
9934    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
9935    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
9936    /// "descending"}`.
9937    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
9938    /// for sorting by another field.
9939    /// - [An array specifying the field values in preferred
9940    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
9941    /// sort order will obey the values in the array, followed by any unspecified values in their
9942    /// original order. For discrete time field, values in the sort array can be [date-time
9943    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
9944    /// the values can be the month or day names (case insensitive) or their 3-letter initials
9945    /// (e.g., `"Mon"`, `"Tue"`).
9946    /// - `null` indicating no sort.
9947    ///
9948    /// __Default value:__ `"ascending"`
9949    ///
9950    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
9951    ///
9952    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
9953    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
9954    #[builder(default)]
9955    pub sort: RemovableValue<SortUnion>,
9956    /// Type of stacking offset if the field should be stacked. `stack` is only applicable for
9957    /// `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of
9958    /// `y` can be used to customize stacking for a vertical bar chart.
9959    ///
9960    /// `stack` can be one of the following values:
9961    /// - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for
9962    /// creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and
9963    /// [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).
9964    /// - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar
9965    /// and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie
9966    /// charts [with percentage
9967    /// tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>
9968    /// -`"center"` - stacking with center baseline (for
9969    /// [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).
9970    /// - `null` or `false` - No-stacking. This will produce layered
9971    /// [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area
9972    /// chart.
9973    ///
9974    /// __Default value:__ `zero` for plots with all of the following conditions are true: (1)
9975    /// the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a
9976    /// linear scale; (3) At least one of non-position channels mapped to an unaggregated field
9977    /// that is different from x and y. Otherwise, `null` by default.
9978    ///
9979    /// __See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.
9980    #[serde(skip_serializing_if = "Option::is_none")]
9981    #[builder(default)]
9982    pub stack: Option<Stack>,
9983    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
9984    /// temporal field that gets casted as
9985    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
9986    ///
9987    /// __Default value:__ `undefined` (None)
9988    ///
9989    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
9990    /// documentation.
9991    #[serde(skip_serializing_if = "Option::is_none")]
9992    #[builder(default)]
9993    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
9994    /// A title for the field. If `null`, the title will be removed.
9995    ///
9996    /// __Default value:__  derived from the field's name and transformation function
9997    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
9998    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
9999    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
10000    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
10001    /// name.
10002    ///
10003    /// __Notes__:
10004    ///
10005    /// 1) You can customize the default field title format by providing the
10006    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
10007    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
10008    /// [`fieldTitle` function via the `compile` function's
10009    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
10010    ///
10011    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
10012    /// axis/header/legend title will be used.
10013    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10014    #[builder(default)]
10015    pub title: RemovableValue<LegendText>,
10016    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
10017    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
10018    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
10019    ///
10020    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
10021    /// is required for a field if: (1) the field is not nominal and the field encoding has no
10022    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
10023    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
10024    /// or `timeUnit`.
10025    ///
10026    /// __Default value:__
10027    ///
10028    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
10029    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
10030    /// following criteria:
10031    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
10032    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
10033    /// `longitude` channel or (3) if the specified scale type is [a quantitative
10034    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
10035    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
10036    /// the specified scale type is a time or utc scale
10037    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
10038    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
10039    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
10040    /// `order`.
10041    ///
10042    /// 2) For a constant value in data domain (`datum`):
10043    /// - `"quantitative"` if the datum is a number
10044    /// - `"nominal"` if the datum is a string
10045    /// - `"temporal"` if the datum is [a date time
10046    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
10047    ///
10048    /// __Note:__
10049    /// - Data `type` describes the semantics of the data rather than the primitive data types
10050    /// (number, string, etc.). The same primitive data type can have different types of
10051    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
10052    /// data.
10053    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
10054    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
10055    /// `1552199579097`).
10056    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
10057    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
10058    /// (for using an ordinal bin
10059    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
10060    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
10061    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
10062    /// [`"ordinal"` (for using an ordinal
10063    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
10064    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
10065    /// the `type` property refers to the post-aggregation data type. For example, we can
10066    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
10067    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
10068    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
10069    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
10070    ///
10071    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
10072    #[serde(rename = "type")]
10073    #[serde(skip_serializing_if = "Option::is_none")]
10074    #[builder(default)]
10075    pub polar_def_type: Option<Type>,
10076    /// A constant value in data domain.
10077    #[serde(skip_serializing_if = "Option::is_none")]
10078    #[builder(default)]
10079    pub datum: Option<PrimitiveValue>,
10080    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
10081    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
10082    /// between `0` to `1` for opacity).
10083    #[serde(skip_serializing_if = "Option::is_none")]
10084    #[builder(default)]
10085    pub value: Option<Latitude2Value>,
10086}
10087
10088#[derive(Debug, Clone, Serialize, Deserialize)]
10089#[serde(untagged)]
10090#[derive(From)]
10091pub enum Stack {
10092    Bool(bool),
10093    Enum(StackOffset),
10094}
10095
10096/// Mode for stacking marks. One of `"zero"` (default), `"center"`, or `"normalize"`. The
10097/// `"zero"` offset will stack starting at `0`. The `"center"` offset will center the stacks.
10098/// The `"normalize"` offset will compute percentage values for each stack point, with output
10099/// values in the range `[0,1]`.
10100///
10101/// __Default value:__ `"zero"`
10102#[derive(Debug, Clone, Serialize, Deserialize)]
10103#[serde(rename_all = "snake_case")]
10104pub enum StackOffset {
10105    Center,
10106    Normalize,
10107    Zero,
10108}
10109
10110/// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
10111/// `"rule"`.
10112///
10113/// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
10114/// and  `"rule"`.
10115///
10116/// The inner radius in pixels of arc marks.
10117///
10118/// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
10119/// values proceed clockwise.
10120///
10121/// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
10122///
10123/// The `value` of this channel can be a number or a string `"width"` for the width of the
10124/// plot.
10125///
10126/// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
10127///
10128/// The `value` of this channel can be a number or a string `"height"` for the height of the
10129/// plot.
10130///
10131/// A field definition of a secondary channel that shares a scale with another primary
10132/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
10133///
10134/// Definition object for a constant value (primitive value or gradient definition) of an
10135/// encoding channel.
10136#[derive(Debug, Clone, Serialize, Deserialize)]
10137#[serde(rename_all = "camelCase")]
10138#[derive(Default, Builder)]
10139#[builder(setter(into, strip_option))]
10140pub struct Radius2Class {
10141    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
10142    /// `"max"`, `"count"`).
10143    ///
10144    /// __Default value:__ `undefined` (None)
10145    ///
10146    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
10147    /// documentation.
10148    #[serde(skip_serializing_if = "Option::is_none")]
10149    #[builder(default)]
10150    pub aggregate: Option<Aggregate>,
10151    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
10152    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
10153    /// middle of the band if set to `0.5`.
10154    #[serde(skip_serializing_if = "Option::is_none")]
10155    #[builder(default)]
10156    pub band_position: Option<f64>,
10157    /// A flag for binning a `quantitative` field, [an object defining binning
10158    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
10159    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
10160    /// (`"binned"`).
10161    ///
10162    /// - If `true`, default [binning
10163    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
10164    /// applied.
10165    ///
10166    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
10167    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
10168    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
10169    /// the axis ticks based on the bin step, you can also set the axis's
10170    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
10171    ///
10172    /// __Default value:__ `false`
10173    ///
10174    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
10175    #[serde(skip_serializing_if = "Option::is_none")]
10176    #[builder(default)]
10177    pub bin: Option<serde_json::Value>,
10178    /// __Required.__ A string defining the name of the field from which to pull a data value or
10179    /// an object defining iterated values from the
10180    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
10181    ///
10182    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
10183    ///
10184    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
10185    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
10186    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
10187    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
10188    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
10189    /// required if `aggregate` is `count`.
10190    #[serde(skip_serializing_if = "Option::is_none")]
10191    #[builder(default)]
10192    pub field: Option<Field>,
10193    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
10194    /// temporal field that gets casted as
10195    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
10196    ///
10197    /// __Default value:__ `undefined` (None)
10198    ///
10199    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
10200    /// documentation.
10201    #[serde(skip_serializing_if = "Option::is_none")]
10202    #[builder(default)]
10203    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
10204    /// A title for the field. If `null`, the title will be removed.
10205    ///
10206    /// __Default value:__  derived from the field's name and transformation function
10207    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
10208    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
10209    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
10210    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
10211    /// name.
10212    ///
10213    /// __Notes__:
10214    ///
10215    /// 1) You can customize the default field title format by providing the
10216    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
10217    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
10218    /// [`fieldTitle` function via the `compile` function's
10219    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
10220    ///
10221    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
10222    /// axis/header/legend title will be used.
10223    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10224    #[builder(default)]
10225    pub title: RemovableValue<LegendText>,
10226    /// A constant value in data domain.
10227    #[serde(skip_serializing_if = "Option::is_none")]
10228    #[builder(default)]
10229    pub datum: Option<PrimitiveValue>,
10230    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
10231    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
10232    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
10233    ///
10234    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
10235    /// is required for a field if: (1) the field is not nominal and the field encoding has no
10236    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
10237    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
10238    /// or `timeUnit`.
10239    ///
10240    /// __Default value:__
10241    ///
10242    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
10243    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
10244    /// following criteria:
10245    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
10246    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
10247    /// `longitude` channel or (3) if the specified scale type is [a quantitative
10248    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
10249    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
10250    /// the specified scale type is a time or utc scale
10251    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
10252    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
10253    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
10254    /// `order`.
10255    ///
10256    /// 2) For a constant value in data domain (`datum`):
10257    /// - `"quantitative"` if the datum is a number
10258    /// - `"nominal"` if the datum is a string
10259    /// - `"temporal"` if the datum is [a date time
10260    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
10261    ///
10262    /// __Note:__
10263    /// - Data `type` describes the semantics of the data rather than the primitive data types
10264    /// (number, string, etc.). The same primitive data type can have different types of
10265    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
10266    /// data.
10267    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
10268    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
10269    /// `1552199579097`).
10270    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
10271    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
10272    /// (for using an ordinal bin
10273    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
10274    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
10275    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
10276    /// [`"ordinal"` (for using an ordinal
10277    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
10278    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
10279    /// the `type` property refers to the post-aggregation data type. For example, we can
10280    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
10281    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
10282    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
10283    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
10284    ///
10285    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
10286    #[serde(rename = "type")]
10287    #[serde(skip_serializing_if = "Option::is_none")]
10288    #[builder(default)]
10289    pub position2_def_type: Option<Type>,
10290    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
10291    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
10292    /// between `0` to `1` for opacity).
10293    #[serde(skip_serializing_if = "Option::is_none")]
10294    #[builder(default)]
10295    pub value: Option<Latitude2Value>,
10296}
10297
10298/// Shape of the mark.
10299///
10300/// 1. For `point` marks the supported values include:   - plotting shapes: `"circle"`,
10301/// `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`,
10302/// `"triangle-right"`, or `"triangle-left"`.   - the line symbol `"stroke"`   - centered
10303/// directional shapes `"arrow"`, `"wedge"`, or `"triangle"`   - a custom [SVG path
10304/// string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct
10305/// sizing, custom shape paths should be defined within a square bounding box with
10306/// coordinates ranging from -1 to 1 along both the x and y dimensions.)
10307///
10308/// 2. For `geoshape` marks it should be a field definition of the geojson data
10309///
10310/// __Default value:__ If undefined, the default shape depends on [mark
10311/// config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape`
10312/// property. (`"circle"` if unset.)
10313///
10314/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
10315#[derive(Debug, Clone, Serialize, Deserialize)]
10316#[serde(rename_all = "camelCase")]
10317#[derive(Default, Builder)]
10318#[builder(setter(into, strip_option))]
10319pub struct MarkPropDefStringNullTypeForShape {
10320    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
10321    /// `"max"`, `"count"`).
10322    ///
10323    /// __Default value:__ `undefined` (None)
10324    ///
10325    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
10326    /// documentation.
10327    #[serde(skip_serializing_if = "Option::is_none")]
10328    #[builder(default)]
10329    pub aggregate: Option<Aggregate>,
10330    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
10331    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
10332    /// middle of the band if set to `0.5`.
10333    #[serde(skip_serializing_if = "Option::is_none")]
10334    #[builder(default)]
10335    pub band_position: Option<f64>,
10336    /// A flag for binning a `quantitative` field, [an object defining binning
10337    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
10338    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
10339    /// (`"binned"`).
10340    ///
10341    /// - If `true`, default [binning
10342    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
10343    /// applied.
10344    ///
10345    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
10346    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
10347    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
10348    /// the axis ticks based on the bin step, you can also set the axis's
10349    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
10350    ///
10351    /// __Default value:__ `false`
10352    ///
10353    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
10354    #[serde(skip_serializing_if = "Option::is_none")]
10355    #[builder(default)]
10356    pub bin: Option<AngleBin>,
10357    /// One or more value definition(s) with [a parameter or a test
10358    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
10359    ///
10360    /// __Note:__ A field definition's `condition` property can only contain [conditional value
10361    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
10362    /// only allows at most one encoded field per encoding channel.
10363    ///
10364    /// A field definition or one or more value definition(s) with a parameter predicate.
10365    #[serde(skip_serializing_if = "Option::is_none")]
10366    #[builder(default)]
10367    pub condition: Option<ShapeCondition>,
10368    /// __Required.__ A string defining the name of the field from which to pull a data value or
10369    /// an object defining iterated values from the
10370    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
10371    ///
10372    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
10373    ///
10374    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
10375    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
10376    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
10377    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
10378    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
10379    /// required if `aggregate` is `count`.
10380    #[serde(skip_serializing_if = "Option::is_none")]
10381    #[builder(default)]
10382    pub field: Option<Field>,
10383    /// An object defining properties of the legend. If `null`, the legend for the encoding
10384    /// channel will be removed.
10385    ///
10386    /// __Default value:__ If undefined, default [legend
10387    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
10388    ///
10389    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
10390    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10391    #[builder(default)]
10392    pub legend: RemovableValue<Legend>,
10393    /// An object defining properties of the channel's scale, which is the function that
10394    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
10395    /// (pixels, colors, sizes) of the encoding channels.
10396    ///
10397    /// If `null`, the scale will be [disabled and the data value will be directly
10398    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
10399    ///
10400    /// __Default value:__ If undefined, default [scale
10401    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
10402    ///
10403    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
10404    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10405    #[builder(default)]
10406    pub scale: RemovableValue<Scale>,
10407    /// Sort order for the encoded field.
10408    ///
10409    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
10410    /// `"descending"`.
10411    ///
10412    /// For discrete fields, `sort` can be one of the following:
10413    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
10414    /// JavaScript.
10415    /// - [A string indicating an encoding channel name to sort
10416    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
10417    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
10418    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
10419    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
10420    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
10421    /// "descending"}`.
10422    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
10423    /// for sorting by another field.
10424    /// - [An array specifying the field values in preferred
10425    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
10426    /// sort order will obey the values in the array, followed by any unspecified values in their
10427    /// original order. For discrete time field, values in the sort array can be [date-time
10428    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
10429    /// the values can be the month or day names (case insensitive) or their 3-letter initials
10430    /// (e.g., `"Mon"`, `"Tue"`).
10431    /// - `null` indicating no sort.
10432    ///
10433    /// __Default value:__ `"ascending"`
10434    ///
10435    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
10436    ///
10437    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
10438    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10439    #[builder(default)]
10440    pub sort: RemovableValue<SortUnion>,
10441    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
10442    /// temporal field that gets casted as
10443    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
10444    ///
10445    /// __Default value:__ `undefined` (None)
10446    ///
10447    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
10448    /// documentation.
10449    #[serde(skip_serializing_if = "Option::is_none")]
10450    #[builder(default)]
10451    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
10452    /// A title for the field. If `null`, the title will be removed.
10453    ///
10454    /// __Default value:__  derived from the field's name and transformation function
10455    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
10456    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
10457    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
10458    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
10459    /// name.
10460    ///
10461    /// __Notes__:
10462    ///
10463    /// 1) You can customize the default field title format by providing the
10464    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
10465    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
10466    /// [`fieldTitle` function via the `compile` function's
10467    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
10468    ///
10469    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
10470    /// axis/header/legend title will be used.
10471    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10472    #[builder(default)]
10473    pub title: RemovableValue<LegendText>,
10474    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
10475    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
10476    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
10477    ///
10478    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
10479    /// is required for a field if: (1) the field is not nominal and the field encoding has no
10480    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
10481    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
10482    /// or `timeUnit`.
10483    ///
10484    /// __Default value:__
10485    ///
10486    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
10487    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
10488    /// following criteria:
10489    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
10490    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
10491    /// `longitude` channel or (3) if the specified scale type is [a quantitative
10492    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
10493    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
10494    /// the specified scale type is a time or utc scale
10495    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
10496    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
10497    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
10498    /// `order`.
10499    ///
10500    /// 2) For a constant value in data domain (`datum`):
10501    /// - `"quantitative"` if the datum is a number
10502    /// - `"nominal"` if the datum is a string
10503    /// - `"temporal"` if the datum is [a date time
10504    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
10505    ///
10506    /// __Note:__
10507    /// - Data `type` describes the semantics of the data rather than the primitive data types
10508    /// (number, string, etc.). The same primitive data type can have different types of
10509    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
10510    /// data.
10511    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
10512    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
10513    /// `1552199579097`).
10514    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
10515    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
10516    /// (for using an ordinal bin
10517    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
10518    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
10519    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
10520    /// [`"ordinal"` (for using an ordinal
10521    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
10522    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
10523    /// the `type` property refers to the post-aggregation data type. For example, we can
10524    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
10525    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
10526    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
10527    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
10528    ///
10529    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
10530    #[serde(rename = "type")]
10531    #[serde(skip_serializing_if = "Option::is_none")]
10532    #[builder(default)]
10533    pub mark_prop_def_string_null_type_for_shape_type: Option<Type>,
10534    /// A constant value in data domain.
10535    #[serde(skip_serializing_if = "Option::is_none")]
10536    #[builder(default)]
10537    pub datum: Option<PrimitiveValue>,
10538    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
10539    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
10540    /// between `0` to `1` for opacity).
10541    #[serde(skip_serializing_if = "Option::is_none")]
10542    #[builder(default)]
10543    pub value: Option<Box<Color>>,
10544}
10545
10546#[derive(Debug, Clone, Serialize, Deserialize)]
10547#[serde(untagged)]
10548#[derive(From)]
10549pub enum ShapeCondition {
10550    ConditionalPValueDefStringNullExprRef(ConditionalPValueDefStringNullExprRef),
10551    ConditionalValueDefStringNullExprRefArray(Vec<ConditionalValueDefStringNullExprRef>),
10552}
10553
10554#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
10555#[builder(setter(into, strip_option))]
10556pub struct ConditionalValueDefStringNullExprRef {
10557    /// Predicate for triggering the condition
10558    #[serde(skip_serializing_if = "Option::is_none")]
10559    #[builder(default)]
10560    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
10561    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
10562    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
10563    /// between `0` to `1` for opacity).
10564    #[serde(skip_serializing_if = "Option::is_none")]
10565    #[builder(default)]
10566    pub value: Option<Box<Color>>,
10567    /// For selection parameters, the predicate of empty selections returns true by default.
10568    /// Override this behavior, by setting this property `empty: false`.
10569    #[serde(skip_serializing_if = "Option::is_none")]
10570    #[builder(default)]
10571    pub empty: Option<bool>,
10572    /// Filter using a parameter name.
10573    #[serde(skip_serializing_if = "Option::is_none")]
10574    #[builder(default)]
10575    pub param: Option<String>,
10576}
10577
10578#[derive(Debug, Clone, Serialize, Deserialize)]
10579#[serde(rename_all = "camelCase")]
10580#[derive(Default, Builder)]
10581#[builder(setter(into, strip_option))]
10582pub struct ConditionalPValueDefStringNullExprRef {
10583    /// Predicate for triggering the condition
10584    #[serde(skip_serializing_if = "Option::is_none")]
10585    #[builder(default)]
10586    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
10587    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
10588    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
10589    /// between `0` to `1` for opacity).
10590    #[serde(skip_serializing_if = "Option::is_none")]
10591    #[builder(default)]
10592    pub value: Option<Box<Color>>,
10593    /// For selection parameters, the predicate of empty selections returns true by default.
10594    /// Override this behavior, by setting this property `empty: false`.
10595    #[serde(skip_serializing_if = "Option::is_none")]
10596    #[builder(default)]
10597    pub empty: Option<bool>,
10598    /// Filter using a parameter name.
10599    #[serde(skip_serializing_if = "Option::is_none")]
10600    #[builder(default)]
10601    pub param: Option<String>,
10602    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
10603    /// `"max"`, `"count"`).
10604    ///
10605    /// __Default value:__ `undefined` (None)
10606    ///
10607    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
10608    /// documentation.
10609    #[serde(skip_serializing_if = "Option::is_none")]
10610    #[builder(default)]
10611    pub aggregate: Option<Aggregate>,
10612    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
10613    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
10614    /// middle of the band if set to `0.5`.
10615    #[serde(skip_serializing_if = "Option::is_none")]
10616    #[builder(default)]
10617    pub band_position: Option<f64>,
10618    /// A flag for binning a `quantitative` field, [an object defining binning
10619    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
10620    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
10621    /// (`"binned"`).
10622    ///
10623    /// - If `true`, default [binning
10624    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
10625    /// applied.
10626    ///
10627    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
10628    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
10629    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
10630    /// the axis ticks based on the bin step, you can also set the axis's
10631    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
10632    ///
10633    /// __Default value:__ `false`
10634    ///
10635    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
10636    #[serde(skip_serializing_if = "Option::is_none")]
10637    #[builder(default)]
10638    pub bin: Option<AngleBin>,
10639    /// __Required.__ A string defining the name of the field from which to pull a data value or
10640    /// an object defining iterated values from the
10641    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
10642    ///
10643    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
10644    ///
10645    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
10646    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
10647    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
10648    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
10649    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
10650    /// required if `aggregate` is `count`.
10651    #[serde(skip_serializing_if = "Option::is_none")]
10652    #[builder(default)]
10653    pub field: Option<Field>,
10654    /// An object defining properties of the legend. If `null`, the legend for the encoding
10655    /// channel will be removed.
10656    ///
10657    /// __Default value:__ If undefined, default [legend
10658    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
10659    ///
10660    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
10661    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10662    #[builder(default)]
10663    pub legend: RemovableValue<Legend>,
10664    /// An object defining properties of the channel's scale, which is the function that
10665    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
10666    /// (pixels, colors, sizes) of the encoding channels.
10667    ///
10668    /// If `null`, the scale will be [disabled and the data value will be directly
10669    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
10670    ///
10671    /// __Default value:__ If undefined, default [scale
10672    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
10673    ///
10674    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
10675    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10676    #[builder(default)]
10677    pub scale: RemovableValue<Scale>,
10678    /// Sort order for the encoded field.
10679    ///
10680    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
10681    /// `"descending"`.
10682    ///
10683    /// For discrete fields, `sort` can be one of the following:
10684    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
10685    /// JavaScript.
10686    /// - [A string indicating an encoding channel name to sort
10687    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
10688    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
10689    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
10690    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
10691    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
10692    /// "descending"}`.
10693    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
10694    /// for sorting by another field.
10695    /// - [An array specifying the field values in preferred
10696    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
10697    /// sort order will obey the values in the array, followed by any unspecified values in their
10698    /// original order. For discrete time field, values in the sort array can be [date-time
10699    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
10700    /// the values can be the month or day names (case insensitive) or their 3-letter initials
10701    /// (e.g., `"Mon"`, `"Tue"`).
10702    /// - `null` indicating no sort.
10703    ///
10704    /// __Default value:__ `"ascending"`
10705    ///
10706    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
10707    ///
10708    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
10709    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10710    #[builder(default)]
10711    pub sort: RemovableValue<SortUnion>,
10712    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
10713    /// temporal field that gets casted as
10714    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
10715    ///
10716    /// __Default value:__ `undefined` (None)
10717    ///
10718    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
10719    /// documentation.
10720    #[serde(skip_serializing_if = "Option::is_none")]
10721    #[builder(default)]
10722    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
10723    /// A title for the field. If `null`, the title will be removed.
10724    ///
10725    /// __Default value:__  derived from the field's name and transformation function
10726    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
10727    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
10728    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
10729    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
10730    /// name.
10731    ///
10732    /// __Notes__:
10733    ///
10734    /// 1) You can customize the default field title format by providing the
10735    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
10736    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
10737    /// [`fieldTitle` function via the `compile` function's
10738    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
10739    ///
10740    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
10741    /// axis/header/legend title will be used.
10742    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10743    #[builder(default)]
10744    pub title: RemovableValue<LegendText>,
10745    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
10746    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
10747    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
10748    ///
10749    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
10750    /// is required for a field if: (1) the field is not nominal and the field encoding has no
10751    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
10752    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
10753    /// or `timeUnit`.
10754    ///
10755    /// __Default value:__
10756    ///
10757    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
10758    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
10759    /// following criteria:
10760    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
10761    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
10762    /// `longitude` channel or (3) if the specified scale type is [a quantitative
10763    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
10764    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
10765    /// the specified scale type is a time or utc scale
10766    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
10767    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
10768    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
10769    /// `order`.
10770    ///
10771    /// 2) For a constant value in data domain (`datum`):
10772    /// - `"quantitative"` if the datum is a number
10773    /// - `"nominal"` if the datum is a string
10774    /// - `"temporal"` if the datum is [a date time
10775    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
10776    ///
10777    /// __Note:__
10778    /// - Data `type` describes the semantics of the data rather than the primitive data types
10779    /// (number, string, etc.). The same primitive data type can have different types of
10780    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
10781    /// data.
10782    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
10783    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
10784    /// `1552199579097`).
10785    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
10786    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
10787    /// (for using an ordinal bin
10788    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
10789    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
10790    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
10791    /// [`"ordinal"` (for using an ordinal
10792    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
10793    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
10794    /// the `type` property refers to the post-aggregation data type. For example, we can
10795    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
10796    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
10797    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
10798    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
10799    ///
10800    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
10801    #[serde(rename = "type")]
10802    #[serde(skip_serializing_if = "Option::is_none")]
10803    #[builder(default)]
10804    pub conditional_p_value_def_string_null_expr_ref_type: Option<Type>,
10805    /// A constant value in data domain.
10806    #[serde(skip_serializing_if = "Option::is_none")]
10807    #[builder(default)]
10808    pub datum: Option<PrimitiveValue>,
10809}
10810
10811/// Rotation angle of point and text marks.
10812///
10813/// Fill opacity of the marks.
10814///
10815/// __Default value:__ If undefined, the default opacity depends on [mark
10816/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
10817/// property.
10818///
10819/// Opacity of the marks.
10820///
10821/// __Default value:__ If undefined, the default opacity depends on [mark
10822/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
10823/// property.
10824///
10825/// Size of the mark.
10826/// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
10827/// - For `"bar"` and `"tick"` – the bar and tick's size.
10828/// - For `"text"` – the text's font size.
10829/// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
10830/// line with varying size)
10831///
10832/// Stroke opacity of the marks.
10833///
10834/// __Default value:__ If undefined, the default opacity depends on [mark
10835/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
10836/// property.
10837///
10838/// Stroke width of the marks.
10839///
10840/// __Default value:__ If undefined, the default stroke width depends on [mark
10841/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
10842/// property.
10843///
10844/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
10845#[derive(Debug, Clone, Serialize, Deserialize)]
10846#[serde(rename_all = "camelCase")]
10847#[derive(Default, Builder)]
10848#[builder(setter(into, strip_option))]
10849pub struct SizeClass {
10850    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
10851    /// `"max"`, `"count"`).
10852    ///
10853    /// __Default value:__ `undefined` (None)
10854    ///
10855    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
10856    /// documentation.
10857    #[serde(skip_serializing_if = "Option::is_none")]
10858    #[builder(default)]
10859    pub aggregate: Option<Aggregate>,
10860    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
10861    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
10862    /// middle of the band if set to `0.5`.
10863    #[serde(skip_serializing_if = "Option::is_none")]
10864    #[builder(default)]
10865    pub band_position: Option<f64>,
10866    /// A flag for binning a `quantitative` field, [an object defining binning
10867    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
10868    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
10869    /// (`"binned"`).
10870    ///
10871    /// - If `true`, default [binning
10872    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
10873    /// applied.
10874    ///
10875    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
10876    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
10877    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
10878    /// the axis ticks based on the bin step, you can also set the axis's
10879    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
10880    ///
10881    /// __Default value:__ `false`
10882    ///
10883    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
10884    #[serde(skip_serializing_if = "Option::is_none")]
10885    #[builder(default)]
10886    pub bin: Option<AngleBin>,
10887    /// One or more value definition(s) with [a parameter or a test
10888    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
10889    ///
10890    /// __Note:__ A field definition's `condition` property can only contain [conditional value
10891    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
10892    /// only allows at most one encoded field per encoding channel.
10893    ///
10894    /// A field definition or one or more value definition(s) with a parameter predicate.
10895    #[serde(skip_serializing_if = "Option::is_none")]
10896    #[builder(default)]
10897    pub condition: Option<AngleCondition>,
10898    /// __Required.__ A string defining the name of the field from which to pull a data value or
10899    /// an object defining iterated values from the
10900    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
10901    ///
10902    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
10903    ///
10904    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
10905    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
10906    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
10907    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
10908    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
10909    /// required if `aggregate` is `count`.
10910    #[serde(skip_serializing_if = "Option::is_none")]
10911    #[builder(default)]
10912    pub field: Option<Field>,
10913    /// An object defining properties of the legend. If `null`, the legend for the encoding
10914    /// channel will be removed.
10915    ///
10916    /// __Default value:__ If undefined, default [legend
10917    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
10918    ///
10919    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
10920    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10921    #[builder(default)]
10922    pub legend: RemovableValue<Legend>,
10923    /// An object defining properties of the channel's scale, which is the function that
10924    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
10925    /// (pixels, colors, sizes) of the encoding channels.
10926    ///
10927    /// If `null`, the scale will be [disabled and the data value will be directly
10928    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
10929    ///
10930    /// __Default value:__ If undefined, default [scale
10931    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
10932    ///
10933    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
10934    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10935    #[builder(default)]
10936    pub scale: RemovableValue<Scale>,
10937    /// Sort order for the encoded field.
10938    ///
10939    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
10940    /// `"descending"`.
10941    ///
10942    /// For discrete fields, `sort` can be one of the following:
10943    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
10944    /// JavaScript.
10945    /// - [A string indicating an encoding channel name to sort
10946    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
10947    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
10948    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
10949    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
10950    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
10951    /// "descending"}`.
10952    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
10953    /// for sorting by another field.
10954    /// - [An array specifying the field values in preferred
10955    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
10956    /// sort order will obey the values in the array, followed by any unspecified values in their
10957    /// original order. For discrete time field, values in the sort array can be [date-time
10958    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
10959    /// the values can be the month or day names (case insensitive) or their 3-letter initials
10960    /// (e.g., `"Mon"`, `"Tue"`).
10961    /// - `null` indicating no sort.
10962    ///
10963    /// __Default value:__ `"ascending"`
10964    ///
10965    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
10966    ///
10967    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
10968    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
10969    #[builder(default)]
10970    pub sort: RemovableValue<SortUnion>,
10971    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
10972    /// temporal field that gets casted as
10973    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
10974    ///
10975    /// __Default value:__ `undefined` (None)
10976    ///
10977    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
10978    /// documentation.
10979    #[serde(skip_serializing_if = "Option::is_none")]
10980    #[builder(default)]
10981    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
10982    /// A title for the field. If `null`, the title will be removed.
10983    ///
10984    /// __Default value:__  derived from the field's name and transformation function
10985    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
10986    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
10987    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
10988    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
10989    /// name.
10990    ///
10991    /// __Notes__:
10992    ///
10993    /// 1) You can customize the default field title format by providing the
10994    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
10995    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
10996    /// [`fieldTitle` function via the `compile` function's
10997    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
10998    ///
10999    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
11000    /// axis/header/legend title will be used.
11001    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11002    #[builder(default)]
11003    pub title: RemovableValue<LegendText>,
11004    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
11005    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
11006    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
11007    ///
11008    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
11009    /// is required for a field if: (1) the field is not nominal and the field encoding has no
11010    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
11011    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
11012    /// or `timeUnit`.
11013    ///
11014    /// __Default value:__
11015    ///
11016    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
11017    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
11018    /// following criteria:
11019    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
11020    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
11021    /// `longitude` channel or (3) if the specified scale type is [a quantitative
11022    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
11023    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
11024    /// the specified scale type is a time or utc scale
11025    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
11026    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
11027    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
11028    /// `order`.
11029    ///
11030    /// 2) For a constant value in data domain (`datum`):
11031    /// - `"quantitative"` if the datum is a number
11032    /// - `"nominal"` if the datum is a string
11033    /// - `"temporal"` if the datum is [a date time
11034    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
11035    ///
11036    /// __Note:__
11037    /// - Data `type` describes the semantics of the data rather than the primitive data types
11038    /// (number, string, etc.). The same primitive data type can have different types of
11039    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
11040    /// data.
11041    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
11042    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
11043    /// `1552199579097`).
11044    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
11045    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
11046    /// (for using an ordinal bin
11047    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
11048    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
11049    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
11050    /// [`"ordinal"` (for using an ordinal
11051    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
11052    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
11053    /// the `type` property refers to the post-aggregation data type. For example, we can
11054    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
11055    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
11056    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
11057    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
11058    ///
11059    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
11060    #[serde(rename = "type")]
11061    #[serde(skip_serializing_if = "Option::is_none")]
11062    #[builder(default)]
11063    pub mark_prop_def_number_type: Option<Type>,
11064    /// A constant value in data domain.
11065    #[serde(skip_serializing_if = "Option::is_none")]
11066    #[builder(default)]
11067    pub datum: Option<PrimitiveValue>,
11068    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
11069    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
11070    /// between `0` to `1` for opacity).
11071    #[serde(skip_serializing_if = "Option::is_none")]
11072    #[builder(default)]
11073    pub value: Option<CornerRadiusUnion>,
11074}
11075
11076/// Color of the marks – either fill or stroke color based on  the `filled` property of mark
11077/// definition. By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
11078/// `"text"`, `"trail"`, `"circle"`, and `"square"` / stroke color for `"line"` and
11079/// `"point"`.
11080///
11081/// __Default value:__ If undefined, the default color depends on [mark
11082/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
11083/// property.
11084///
11085/// _Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please
11086/// use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher
11087/// precedence than `color`, thus may override the `color` encoding if conflicting encodings
11088/// are specified. 2) See the scale documentation for more information about customizing
11089/// [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).
11090///
11091/// Fill color of the marks. __Default value:__ If undefined, the default color depends on
11092/// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
11093/// property.
11094///
11095/// _Note:_ The `fill` encoding has higher precedence than `color`, thus may override the
11096/// `color` encoding if conflicting encodings are specified.
11097///
11098/// Stroke color of the marks. __Default value:__ If undefined, the default color depends on
11099/// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
11100/// property.
11101///
11102/// _Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the
11103/// `color` encoding if conflicting encodings are specified.
11104///
11105/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
11106#[derive(Debug, Clone, Serialize, Deserialize)]
11107#[serde(rename_all = "camelCase")]
11108#[derive(Default, Builder)]
11109#[builder(setter(into, strip_option))]
11110pub struct StrokeClass {
11111    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
11112    /// `"max"`, `"count"`).
11113    ///
11114    /// __Default value:__ `undefined` (None)
11115    ///
11116    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
11117    /// documentation.
11118    #[serde(skip_serializing_if = "Option::is_none")]
11119    #[builder(default)]
11120    pub aggregate: Option<Aggregate>,
11121    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
11122    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
11123    /// middle of the band if set to `0.5`.
11124    #[serde(skip_serializing_if = "Option::is_none")]
11125    #[builder(default)]
11126    pub band_position: Option<f64>,
11127    /// A flag for binning a `quantitative` field, [an object defining binning
11128    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
11129    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
11130    /// (`"binned"`).
11131    ///
11132    /// - If `true`, default [binning
11133    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
11134    /// applied.
11135    ///
11136    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
11137    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
11138    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
11139    /// the axis ticks based on the bin step, you can also set the axis's
11140    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
11141    ///
11142    /// __Default value:__ `false`
11143    ///
11144    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
11145    #[serde(skip_serializing_if = "Option::is_none")]
11146    #[builder(default)]
11147    pub bin: Option<AngleBin>,
11148    /// One or more value definition(s) with [a parameter or a test
11149    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
11150    ///
11151    /// __Note:__ A field definition's `condition` property can only contain [conditional value
11152    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
11153    /// only allows at most one encoded field per encoding channel.
11154    ///
11155    /// A field definition or one or more value definition(s) with a parameter predicate.
11156    #[serde(skip_serializing_if = "Option::is_none")]
11157    #[builder(default)]
11158    pub condition: Option<ColorCondition>,
11159    /// __Required.__ A string defining the name of the field from which to pull a data value or
11160    /// an object defining iterated values from the
11161    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
11162    ///
11163    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
11164    ///
11165    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
11166    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
11167    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
11168    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
11169    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
11170    /// required if `aggregate` is `count`.
11171    #[serde(skip_serializing_if = "Option::is_none")]
11172    #[builder(default)]
11173    pub field: Option<Field>,
11174    /// An object defining properties of the legend. If `null`, the legend for the encoding
11175    /// channel will be removed.
11176    ///
11177    /// __Default value:__ If undefined, default [legend
11178    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
11179    ///
11180    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
11181    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11182    #[builder(default)]
11183    pub legend: RemovableValue<Legend>,
11184    /// An object defining properties of the channel's scale, which is the function that
11185    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
11186    /// (pixels, colors, sizes) of the encoding channels.
11187    ///
11188    /// If `null`, the scale will be [disabled and the data value will be directly
11189    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
11190    ///
11191    /// __Default value:__ If undefined, default [scale
11192    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
11193    ///
11194    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
11195    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11196    #[builder(default)]
11197    pub scale: RemovableValue<Scale>,
11198    /// Sort order for the encoded field.
11199    ///
11200    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
11201    /// `"descending"`.
11202    ///
11203    /// For discrete fields, `sort` can be one of the following:
11204    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
11205    /// JavaScript.
11206    /// - [A string indicating an encoding channel name to sort
11207    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
11208    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
11209    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
11210    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
11211    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
11212    /// "descending"}`.
11213    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
11214    /// for sorting by another field.
11215    /// - [An array specifying the field values in preferred
11216    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
11217    /// sort order will obey the values in the array, followed by any unspecified values in their
11218    /// original order. For discrete time field, values in the sort array can be [date-time
11219    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
11220    /// the values can be the month or day names (case insensitive) or their 3-letter initials
11221    /// (e.g., `"Mon"`, `"Tue"`).
11222    /// - `null` indicating no sort.
11223    ///
11224    /// __Default value:__ `"ascending"`
11225    ///
11226    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
11227    ///
11228    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
11229    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11230    #[builder(default)]
11231    pub sort: RemovableValue<SortUnion>,
11232    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
11233    /// temporal field that gets casted as
11234    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
11235    ///
11236    /// __Default value:__ `undefined` (None)
11237    ///
11238    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
11239    /// documentation.
11240    #[serde(skip_serializing_if = "Option::is_none")]
11241    #[builder(default)]
11242    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
11243    /// A title for the field. If `null`, the title will be removed.
11244    ///
11245    /// __Default value:__  derived from the field's name and transformation function
11246    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
11247    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
11248    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
11249    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
11250    /// name.
11251    ///
11252    /// __Notes__:
11253    ///
11254    /// 1) You can customize the default field title format by providing the
11255    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
11256    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
11257    /// [`fieldTitle` function via the `compile` function's
11258    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
11259    ///
11260    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
11261    /// axis/header/legend title will be used.
11262    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11263    #[builder(default)]
11264    pub title: RemovableValue<LegendText>,
11265    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
11266    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
11267    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
11268    ///
11269    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
11270    /// is required for a field if: (1) the field is not nominal and the field encoding has no
11271    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
11272    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
11273    /// or `timeUnit`.
11274    ///
11275    /// __Default value:__
11276    ///
11277    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
11278    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
11279    /// following criteria:
11280    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
11281    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
11282    /// `longitude` channel or (3) if the specified scale type is [a quantitative
11283    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
11284    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
11285    /// the specified scale type is a time or utc scale
11286    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
11287    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
11288    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
11289    /// `order`.
11290    ///
11291    /// 2) For a constant value in data domain (`datum`):
11292    /// - `"quantitative"` if the datum is a number
11293    /// - `"nominal"` if the datum is a string
11294    /// - `"temporal"` if the datum is [a date time
11295    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
11296    ///
11297    /// __Note:__
11298    /// - Data `type` describes the semantics of the data rather than the primitive data types
11299    /// (number, string, etc.). The same primitive data type can have different types of
11300    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
11301    /// data.
11302    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
11303    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
11304    /// `1552199579097`).
11305    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
11306    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
11307    /// (for using an ordinal bin
11308    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
11309    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
11310    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
11311    /// [`"ordinal"` (for using an ordinal
11312    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
11313    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
11314    /// the `type` property refers to the post-aggregation data type. For example, we can
11315    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
11316    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
11317    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
11318    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
11319    ///
11320    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
11321    #[serde(rename = "type")]
11322    #[serde(skip_serializing_if = "Option::is_none")]
11323    #[builder(default)]
11324    pub mark_prop_def_gradient_string_null_type: Option<Type>,
11325    /// A constant value in data domain.
11326    #[serde(skip_serializing_if = "Option::is_none")]
11327    #[builder(default)]
11328    pub datum: Option<PrimitiveValue>,
11329    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
11330    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
11331    /// between `0` to `1` for opacity).
11332    #[serde(skip_serializing_if = "Option::is_none")]
11333    #[builder(default)]
11334    pub value: Option<ConditionalValueDefGradientStringNullExprRefValue>,
11335}
11336
11337/// Stroke dash of the marks.
11338///
11339/// __Default value:__ `[1,0]` (No dash).
11340///
11341/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
11342#[derive(Debug, Clone, Serialize, Deserialize)]
11343#[serde(rename_all = "camelCase")]
11344#[derive(Default, Builder)]
11345#[builder(setter(into, strip_option))]
11346pub struct MarkPropDefNumber {
11347    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
11348    /// `"max"`, `"count"`).
11349    ///
11350    /// __Default value:__ `undefined` (None)
11351    ///
11352    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
11353    /// documentation.
11354    #[serde(skip_serializing_if = "Option::is_none")]
11355    #[builder(default)]
11356    pub aggregate: Option<Aggregate>,
11357    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
11358    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
11359    /// middle of the band if set to `0.5`.
11360    #[serde(skip_serializing_if = "Option::is_none")]
11361    #[builder(default)]
11362    pub band_position: Option<f64>,
11363    /// A flag for binning a `quantitative` field, [an object defining binning
11364    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
11365    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
11366    /// (`"binned"`).
11367    ///
11368    /// - If `true`, default [binning
11369    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
11370    /// applied.
11371    ///
11372    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
11373    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
11374    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
11375    /// the axis ticks based on the bin step, you can also set the axis's
11376    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
11377    ///
11378    /// __Default value:__ `false`
11379    ///
11380    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
11381    #[serde(skip_serializing_if = "Option::is_none")]
11382    #[builder(default)]
11383    pub bin: Option<AngleBin>,
11384    /// One or more value definition(s) with [a parameter or a test
11385    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
11386    ///
11387    /// __Note:__ A field definition's `condition` property can only contain [conditional value
11388    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
11389    /// only allows at most one encoded field per encoding channel.
11390    ///
11391    /// A field definition or one or more value definition(s) with a parameter predicate.
11392    #[serde(skip_serializing_if = "Option::is_none")]
11393    #[builder(default)]
11394    pub condition: Option<StrokeDashCondition>,
11395    /// __Required.__ A string defining the name of the field from which to pull a data value or
11396    /// an object defining iterated values from the
11397    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
11398    ///
11399    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
11400    ///
11401    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
11402    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
11403    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
11404    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
11405    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
11406    /// required if `aggregate` is `count`.
11407    #[serde(skip_serializing_if = "Option::is_none")]
11408    #[builder(default)]
11409    pub field: Option<Field>,
11410    /// An object defining properties of the legend. If `null`, the legend for the encoding
11411    /// channel will be removed.
11412    ///
11413    /// __Default value:__ If undefined, default [legend
11414    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
11415    ///
11416    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
11417    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11418    #[builder(default)]
11419    pub legend: RemovableValue<Legend>,
11420    /// An object defining properties of the channel's scale, which is the function that
11421    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
11422    /// (pixels, colors, sizes) of the encoding channels.
11423    ///
11424    /// If `null`, the scale will be [disabled and the data value will be directly
11425    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
11426    ///
11427    /// __Default value:__ If undefined, default [scale
11428    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
11429    ///
11430    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
11431    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11432    #[builder(default)]
11433    pub scale: RemovableValue<Scale>,
11434    /// Sort order for the encoded field.
11435    ///
11436    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
11437    /// `"descending"`.
11438    ///
11439    /// For discrete fields, `sort` can be one of the following:
11440    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
11441    /// JavaScript.
11442    /// - [A string indicating an encoding channel name to sort
11443    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
11444    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
11445    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
11446    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
11447    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
11448    /// "descending"}`.
11449    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
11450    /// for sorting by another field.
11451    /// - [An array specifying the field values in preferred
11452    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
11453    /// sort order will obey the values in the array, followed by any unspecified values in their
11454    /// original order. For discrete time field, values in the sort array can be [date-time
11455    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
11456    /// the values can be the month or day names (case insensitive) or their 3-letter initials
11457    /// (e.g., `"Mon"`, `"Tue"`).
11458    /// - `null` indicating no sort.
11459    ///
11460    /// __Default value:__ `"ascending"`
11461    ///
11462    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
11463    ///
11464    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
11465    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11466    #[builder(default)]
11467    pub sort: RemovableValue<SortUnion>,
11468    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
11469    /// temporal field that gets casted as
11470    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
11471    ///
11472    /// __Default value:__ `undefined` (None)
11473    ///
11474    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
11475    /// documentation.
11476    #[serde(skip_serializing_if = "Option::is_none")]
11477    #[builder(default)]
11478    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
11479    /// A title for the field. If `null`, the title will be removed.
11480    ///
11481    /// __Default value:__  derived from the field's name and transformation function
11482    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
11483    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
11484    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
11485    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
11486    /// name.
11487    ///
11488    /// __Notes__:
11489    ///
11490    /// 1) You can customize the default field title format by providing the
11491    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
11492    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
11493    /// [`fieldTitle` function via the `compile` function's
11494    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
11495    ///
11496    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
11497    /// axis/header/legend title will be used.
11498    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11499    #[builder(default)]
11500    pub title: RemovableValue<LegendText>,
11501    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
11502    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
11503    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
11504    ///
11505    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
11506    /// is required for a field if: (1) the field is not nominal and the field encoding has no
11507    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
11508    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
11509    /// or `timeUnit`.
11510    ///
11511    /// __Default value:__
11512    ///
11513    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
11514    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
11515    /// following criteria:
11516    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
11517    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
11518    /// `longitude` channel or (3) if the specified scale type is [a quantitative
11519    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
11520    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
11521    /// the specified scale type is a time or utc scale
11522    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
11523    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
11524    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
11525    /// `order`.
11526    ///
11527    /// 2) For a constant value in data domain (`datum`):
11528    /// - `"quantitative"` if the datum is a number
11529    /// - `"nominal"` if the datum is a string
11530    /// - `"temporal"` if the datum is [a date time
11531    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
11532    ///
11533    /// __Note:__
11534    /// - Data `type` describes the semantics of the data rather than the primitive data types
11535    /// (number, string, etc.). The same primitive data type can have different types of
11536    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
11537    /// data.
11538    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
11539    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
11540    /// `1552199579097`).
11541    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
11542    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
11543    /// (for using an ordinal bin
11544    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
11545    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
11546    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
11547    /// [`"ordinal"` (for using an ordinal
11548    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
11549    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
11550    /// the `type` property refers to the post-aggregation data type. For example, we can
11551    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
11552    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
11553    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
11554    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
11555    ///
11556    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
11557    #[serde(rename = "type")]
11558    #[serde(skip_serializing_if = "Option::is_none")]
11559    #[builder(default)]
11560    pub mark_prop_def_number_type: Option<Type>,
11561    /// A constant value in data domain.
11562    #[serde(skip_serializing_if = "Option::is_none")]
11563    #[builder(default)]
11564    pub datum: Option<PrimitiveValue>,
11565    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
11566    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
11567    /// between `0` to `1` for opacity).
11568    #[serde(skip_serializing_if = "Option::is_none")]
11569    #[builder(default)]
11570    pub value: Option<StrokeDashUnion>,
11571}
11572
11573#[derive(Debug, Clone, Serialize, Deserialize)]
11574#[serde(untagged)]
11575#[derive(From)]
11576pub enum StrokeDashCondition {
11577    ConditionalParameterValueDefNumberExprRefClass(ConditionalParameterValueDefNumberExprRefClass),
11578    ConditionalValueDefNumberExprRefElementArray(Vec<ConditionalValueDefNumberExprRefElement>),
11579}
11580
11581#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
11582#[builder(setter(into, strip_option))]
11583pub struct ConditionalValueDefNumberExprRefElement {
11584    /// Predicate for triggering the condition
11585    #[serde(skip_serializing_if = "Option::is_none")]
11586    #[builder(default)]
11587    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
11588    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
11589    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
11590    /// between `0` to `1` for opacity).
11591    #[serde(skip_serializing_if = "Option::is_none")]
11592    #[builder(default)]
11593    pub value: Option<ConditionalValueDefNumberExprRefValueUnion>,
11594    /// For selection parameters, the predicate of empty selections returns true by default.
11595    /// Override this behavior, by setting this property `empty: false`.
11596    #[serde(skip_serializing_if = "Option::is_none")]
11597    #[builder(default)]
11598    pub empty: Option<bool>,
11599    /// Filter using a parameter name.
11600    #[serde(skip_serializing_if = "Option::is_none")]
11601    #[builder(default)]
11602    pub param: Option<String>,
11603}
11604
11605/// The projection’s translation offset as a two-element array `[tx, ty]`.
11606///
11607/// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
11608/// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
11609/// between `0` to `1` for opacity).
11610#[derive(Debug, Clone, Serialize, Deserialize)]
11611#[serde(untagged)]
11612#[derive(From)]
11613pub enum ConditionalValueDefNumberExprRefValueUnion {
11614    BackgroundExprRef(BackgroundExprRef),
11615    DoubleArray(Vec<f64>),
11616}
11617
11618#[derive(Debug, Clone, Serialize, Deserialize)]
11619#[serde(rename_all = "camelCase")]
11620#[derive(Default, Builder)]
11621#[builder(setter(into, strip_option))]
11622pub struct ConditionalParameterValueDefNumberExprRefClass {
11623    /// Predicate for triggering the condition
11624    #[serde(skip_serializing_if = "Option::is_none")]
11625    #[builder(default)]
11626    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
11627    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
11628    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
11629    /// between `0` to `1` for opacity).
11630    #[serde(skip_serializing_if = "Option::is_none")]
11631    #[builder(default)]
11632    pub value: Option<StrokeDashUnion>,
11633    /// For selection parameters, the predicate of empty selections returns true by default.
11634    /// Override this behavior, by setting this property `empty: false`.
11635    #[serde(skip_serializing_if = "Option::is_none")]
11636    #[builder(default)]
11637    pub empty: Option<bool>,
11638    /// Filter using a parameter name.
11639    #[serde(skip_serializing_if = "Option::is_none")]
11640    #[builder(default)]
11641    pub param: Option<String>,
11642    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
11643    /// `"max"`, `"count"`).
11644    ///
11645    /// __Default value:__ `undefined` (None)
11646    ///
11647    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
11648    /// documentation.
11649    #[serde(skip_serializing_if = "Option::is_none")]
11650    #[builder(default)]
11651    pub aggregate: Option<Aggregate>,
11652    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
11653    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
11654    /// middle of the band if set to `0.5`.
11655    #[serde(skip_serializing_if = "Option::is_none")]
11656    #[builder(default)]
11657    pub band_position: Option<f64>,
11658    /// A flag for binning a `quantitative` field, [an object defining binning
11659    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
11660    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
11661    /// (`"binned"`).
11662    ///
11663    /// - If `true`, default [binning
11664    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
11665    /// applied.
11666    ///
11667    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
11668    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
11669    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
11670    /// the axis ticks based on the bin step, you can also set the axis's
11671    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
11672    ///
11673    /// __Default value:__ `false`
11674    ///
11675    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
11676    #[serde(skip_serializing_if = "Option::is_none")]
11677    #[builder(default)]
11678    pub bin: Option<AngleBin>,
11679    /// __Required.__ A string defining the name of the field from which to pull a data value or
11680    /// an object defining iterated values from the
11681    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
11682    ///
11683    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
11684    ///
11685    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
11686    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
11687    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
11688    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
11689    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
11690    /// required if `aggregate` is `count`.
11691    #[serde(skip_serializing_if = "Option::is_none")]
11692    #[builder(default)]
11693    pub field: Option<Field>,
11694    /// An object defining properties of the legend. If `null`, the legend for the encoding
11695    /// channel will be removed.
11696    ///
11697    /// __Default value:__ If undefined, default [legend
11698    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
11699    ///
11700    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
11701    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11702    #[builder(default)]
11703    pub legend: RemovableValue<Legend>,
11704    /// An object defining properties of the channel's scale, which is the function that
11705    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
11706    /// (pixels, colors, sizes) of the encoding channels.
11707    ///
11708    /// If `null`, the scale will be [disabled and the data value will be directly
11709    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
11710    ///
11711    /// __Default value:__ If undefined, default [scale
11712    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
11713    ///
11714    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
11715    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11716    #[builder(default)]
11717    pub scale: RemovableValue<Scale>,
11718    /// Sort order for the encoded field.
11719    ///
11720    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
11721    /// `"descending"`.
11722    ///
11723    /// For discrete fields, `sort` can be one of the following:
11724    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
11725    /// JavaScript.
11726    /// - [A string indicating an encoding channel name to sort
11727    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
11728    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
11729    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
11730    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
11731    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
11732    /// "descending"}`.
11733    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
11734    /// for sorting by another field.
11735    /// - [An array specifying the field values in preferred
11736    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
11737    /// sort order will obey the values in the array, followed by any unspecified values in their
11738    /// original order. For discrete time field, values in the sort array can be [date-time
11739    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
11740    /// the values can be the month or day names (case insensitive) or their 3-letter initials
11741    /// (e.g., `"Mon"`, `"Tue"`).
11742    /// - `null` indicating no sort.
11743    ///
11744    /// __Default value:__ `"ascending"`
11745    ///
11746    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
11747    ///
11748    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
11749    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11750    #[builder(default)]
11751    pub sort: RemovableValue<SortUnion>,
11752    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
11753    /// temporal field that gets casted as
11754    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
11755    ///
11756    /// __Default value:__ `undefined` (None)
11757    ///
11758    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
11759    /// documentation.
11760    #[serde(skip_serializing_if = "Option::is_none")]
11761    #[builder(default)]
11762    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
11763    /// A title for the field. If `null`, the title will be removed.
11764    ///
11765    /// __Default value:__  derived from the field's name and transformation function
11766    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
11767    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
11768    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
11769    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
11770    /// name.
11771    ///
11772    /// __Notes__:
11773    ///
11774    /// 1) You can customize the default field title format by providing the
11775    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
11776    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
11777    /// [`fieldTitle` function via the `compile` function's
11778    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
11779    ///
11780    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
11781    /// axis/header/legend title will be used.
11782    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11783    #[builder(default)]
11784    pub title: RemovableValue<LegendText>,
11785    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
11786    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
11787    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
11788    ///
11789    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
11790    /// is required for a field if: (1) the field is not nominal and the field encoding has no
11791    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
11792    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
11793    /// or `timeUnit`.
11794    ///
11795    /// __Default value:__
11796    ///
11797    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
11798    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
11799    /// following criteria:
11800    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
11801    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
11802    /// `longitude` channel or (3) if the specified scale type is [a quantitative
11803    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
11804    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
11805    /// the specified scale type is a time or utc scale
11806    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
11807    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
11808    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
11809    /// `order`.
11810    ///
11811    /// 2) For a constant value in data domain (`datum`):
11812    /// - `"quantitative"` if the datum is a number
11813    /// - `"nominal"` if the datum is a string
11814    /// - `"temporal"` if the datum is [a date time
11815    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
11816    ///
11817    /// __Note:__
11818    /// - Data `type` describes the semantics of the data rather than the primitive data types
11819    /// (number, string, etc.). The same primitive data type can have different types of
11820    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
11821    /// data.
11822    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
11823    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
11824    /// `1552199579097`).
11825    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
11826    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
11827    /// (for using an ordinal bin
11828    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
11829    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
11830    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
11831    /// [`"ordinal"` (for using an ordinal
11832    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
11833    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
11834    /// the `type` property refers to the post-aggregation data type. For example, we can
11835    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
11836    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
11837    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
11838    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
11839    ///
11840    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
11841    #[serde(rename = "type")]
11842    #[serde(skip_serializing_if = "Option::is_none")]
11843    #[builder(default)]
11844    pub conditional_p_value_def_number_expr_ref_type: Option<Type>,
11845    /// A constant value in data domain.
11846    #[serde(skip_serializing_if = "Option::is_none")]
11847    #[builder(default)]
11848    pub datum: Option<PrimitiveValue>,
11849}
11850
11851/// Rotation angle of point and text marks.
11852///
11853/// Fill opacity of the marks.
11854///
11855/// __Default value:__ If undefined, the default opacity depends on [mark
11856/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
11857/// property.
11858///
11859/// Opacity of the marks.
11860///
11861/// __Default value:__ If undefined, the default opacity depends on [mark
11862/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
11863/// property.
11864///
11865/// Size of the mark.
11866/// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
11867/// - For `"bar"` and `"tick"` – the bar and tick's size.
11868/// - For `"text"` – the text's font size.
11869/// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
11870/// line with varying size)
11871///
11872/// Stroke opacity of the marks.
11873///
11874/// __Default value:__ If undefined, the default opacity depends on [mark
11875/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
11876/// property.
11877///
11878/// Stroke width of the marks.
11879///
11880/// __Default value:__ If undefined, the default stroke width depends on [mark
11881/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
11882/// property.
11883///
11884/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
11885#[derive(Debug, Clone, Serialize, Deserialize)]
11886#[serde(rename_all = "camelCase")]
11887#[derive(Default, Builder)]
11888#[builder(setter(into, strip_option))]
11889pub struct StrokeOpacityClass {
11890    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
11891    /// `"max"`, `"count"`).
11892    ///
11893    /// __Default value:__ `undefined` (None)
11894    ///
11895    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
11896    /// documentation.
11897    #[serde(skip_serializing_if = "Option::is_none")]
11898    #[builder(default)]
11899    pub aggregate: Option<Aggregate>,
11900    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
11901    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
11902    /// middle of the band if set to `0.5`.
11903    #[serde(skip_serializing_if = "Option::is_none")]
11904    #[builder(default)]
11905    pub band_position: Option<f64>,
11906    /// A flag for binning a `quantitative` field, [an object defining binning
11907    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
11908    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
11909    /// (`"binned"`).
11910    ///
11911    /// - If `true`, default [binning
11912    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
11913    /// applied.
11914    ///
11915    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
11916    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
11917    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
11918    /// the axis ticks based on the bin step, you can also set the axis's
11919    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
11920    ///
11921    /// __Default value:__ `false`
11922    ///
11923    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
11924    #[serde(skip_serializing_if = "Option::is_none")]
11925    #[builder(default)]
11926    pub bin: Option<AngleBin>,
11927    /// One or more value definition(s) with [a parameter or a test
11928    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
11929    ///
11930    /// __Note:__ A field definition's `condition` property can only contain [conditional value
11931    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
11932    /// only allows at most one encoded field per encoding channel.
11933    ///
11934    /// A field definition or one or more value definition(s) with a parameter predicate.
11935    #[serde(skip_serializing_if = "Option::is_none")]
11936    #[builder(default)]
11937    pub condition: Option<AngleCondition>,
11938    /// __Required.__ A string defining the name of the field from which to pull a data value or
11939    /// an object defining iterated values from the
11940    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
11941    ///
11942    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
11943    ///
11944    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
11945    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
11946    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
11947    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
11948    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
11949    /// required if `aggregate` is `count`.
11950    #[serde(skip_serializing_if = "Option::is_none")]
11951    #[builder(default)]
11952    pub field: Option<Field>,
11953    /// An object defining properties of the legend. If `null`, the legend for the encoding
11954    /// channel will be removed.
11955    ///
11956    /// __Default value:__ If undefined, default [legend
11957    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
11958    ///
11959    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
11960    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11961    #[builder(default)]
11962    pub legend: RemovableValue<Legend>,
11963    /// An object defining properties of the channel's scale, which is the function that
11964    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
11965    /// (pixels, colors, sizes) of the encoding channels.
11966    ///
11967    /// If `null`, the scale will be [disabled and the data value will be directly
11968    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
11969    ///
11970    /// __Default value:__ If undefined, default [scale
11971    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
11972    ///
11973    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
11974    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
11975    #[builder(default)]
11976    pub scale: RemovableValue<Scale>,
11977    /// Sort order for the encoded field.
11978    ///
11979    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
11980    /// `"descending"`.
11981    ///
11982    /// For discrete fields, `sort` can be one of the following:
11983    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
11984    /// JavaScript.
11985    /// - [A string indicating an encoding channel name to sort
11986    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
11987    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
11988    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
11989    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
11990    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
11991    /// "descending"}`.
11992    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
11993    /// for sorting by another field.
11994    /// - [An array specifying the field values in preferred
11995    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
11996    /// sort order will obey the values in the array, followed by any unspecified values in their
11997    /// original order. For discrete time field, values in the sort array can be [date-time
11998    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
11999    /// the values can be the month or day names (case insensitive) or their 3-letter initials
12000    /// (e.g., `"Mon"`, `"Tue"`).
12001    /// - `null` indicating no sort.
12002    ///
12003    /// __Default value:__ `"ascending"`
12004    ///
12005    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
12006    ///
12007    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
12008    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12009    #[builder(default)]
12010    pub sort: RemovableValue<SortUnion>,
12011    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
12012    /// temporal field that gets casted as
12013    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
12014    ///
12015    /// __Default value:__ `undefined` (None)
12016    ///
12017    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
12018    /// documentation.
12019    #[serde(skip_serializing_if = "Option::is_none")]
12020    #[builder(default)]
12021    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
12022    /// A title for the field. If `null`, the title will be removed.
12023    ///
12024    /// __Default value:__  derived from the field's name and transformation function
12025    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
12026    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
12027    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
12028    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
12029    /// name.
12030    ///
12031    /// __Notes__:
12032    ///
12033    /// 1) You can customize the default field title format by providing the
12034    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
12035    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
12036    /// [`fieldTitle` function via the `compile` function's
12037    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
12038    ///
12039    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
12040    /// axis/header/legend title will be used.
12041    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12042    #[builder(default)]
12043    pub title: RemovableValue<LegendText>,
12044    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
12045    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
12046    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
12047    ///
12048    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
12049    /// is required for a field if: (1) the field is not nominal and the field encoding has no
12050    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
12051    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
12052    /// or `timeUnit`.
12053    ///
12054    /// __Default value:__
12055    ///
12056    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
12057    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
12058    /// following criteria:
12059    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
12060    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
12061    /// `longitude` channel or (3) if the specified scale type is [a quantitative
12062    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
12063    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
12064    /// the specified scale type is a time or utc scale
12065    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
12066    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
12067    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
12068    /// `order`.
12069    ///
12070    /// 2) For a constant value in data domain (`datum`):
12071    /// - `"quantitative"` if the datum is a number
12072    /// - `"nominal"` if the datum is a string
12073    /// - `"temporal"` if the datum is [a date time
12074    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
12075    ///
12076    /// __Note:__
12077    /// - Data `type` describes the semantics of the data rather than the primitive data types
12078    /// (number, string, etc.). The same primitive data type can have different types of
12079    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
12080    /// data.
12081    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
12082    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
12083    /// `1552199579097`).
12084    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
12085    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
12086    /// (for using an ordinal bin
12087    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
12088    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
12089    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
12090    /// [`"ordinal"` (for using an ordinal
12091    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
12092    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
12093    /// the `type` property refers to the post-aggregation data type. For example, we can
12094    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
12095    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
12096    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
12097    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
12098    ///
12099    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
12100    #[serde(rename = "type")]
12101    #[serde(skip_serializing_if = "Option::is_none")]
12102    #[builder(default)]
12103    pub mark_prop_def_number_type: Option<Type>,
12104    /// A constant value in data domain.
12105    #[serde(skip_serializing_if = "Option::is_none")]
12106    #[builder(default)]
12107    pub datum: Option<PrimitiveValue>,
12108    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
12109    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
12110    /// between `0` to `1` for opacity).
12111    #[serde(skip_serializing_if = "Option::is_none")]
12112    #[builder(default)]
12113    pub value: Option<CornerRadiusUnion>,
12114}
12115
12116/// Rotation angle of point and text marks.
12117///
12118/// Fill opacity of the marks.
12119///
12120/// __Default value:__ If undefined, the default opacity depends on [mark
12121/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
12122/// property.
12123///
12124/// Opacity of the marks.
12125///
12126/// __Default value:__ If undefined, the default opacity depends on [mark
12127/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
12128/// property.
12129///
12130/// Size of the mark.
12131/// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
12132/// - For `"bar"` and `"tick"` – the bar and tick's size.
12133/// - For `"text"` – the text's font size.
12134/// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
12135/// line with varying size)
12136///
12137/// Stroke opacity of the marks.
12138///
12139/// __Default value:__ If undefined, the default opacity depends on [mark
12140/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
12141/// property.
12142///
12143/// Stroke width of the marks.
12144///
12145/// __Default value:__ If undefined, the default stroke width depends on [mark
12146/// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
12147/// property.
12148///
12149/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
12150#[derive(Debug, Clone, Serialize, Deserialize)]
12151#[serde(rename_all = "camelCase")]
12152#[derive(Default, Builder)]
12153#[builder(setter(into, strip_option))]
12154pub struct StrokeWidthClass {
12155    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
12156    /// `"max"`, `"count"`).
12157    ///
12158    /// __Default value:__ `undefined` (None)
12159    ///
12160    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
12161    /// documentation.
12162    #[serde(skip_serializing_if = "Option::is_none")]
12163    #[builder(default)]
12164    pub aggregate: Option<Aggregate>,
12165    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
12166    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
12167    /// middle of the band if set to `0.5`.
12168    #[serde(skip_serializing_if = "Option::is_none")]
12169    #[builder(default)]
12170    pub band_position: Option<f64>,
12171    /// A flag for binning a `quantitative` field, [an object defining binning
12172    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
12173    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
12174    /// (`"binned"`).
12175    ///
12176    /// - If `true`, default [binning
12177    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
12178    /// applied.
12179    ///
12180    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
12181    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
12182    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
12183    /// the axis ticks based on the bin step, you can also set the axis's
12184    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
12185    ///
12186    /// __Default value:__ `false`
12187    ///
12188    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
12189    #[serde(skip_serializing_if = "Option::is_none")]
12190    #[builder(default)]
12191    pub bin: Option<AngleBin>,
12192    /// One or more value definition(s) with [a parameter or a test
12193    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
12194    ///
12195    /// __Note:__ A field definition's `condition` property can only contain [conditional value
12196    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
12197    /// only allows at most one encoded field per encoding channel.
12198    ///
12199    /// A field definition or one or more value definition(s) with a parameter predicate.
12200    #[serde(skip_serializing_if = "Option::is_none")]
12201    #[builder(default)]
12202    pub condition: Option<AngleCondition>,
12203    /// __Required.__ A string defining the name of the field from which to pull a data value or
12204    /// an object defining iterated values from the
12205    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
12206    ///
12207    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
12208    ///
12209    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
12210    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
12211    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
12212    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
12213    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
12214    /// required if `aggregate` is `count`.
12215    #[serde(skip_serializing_if = "Option::is_none")]
12216    #[builder(default)]
12217    pub field: Option<Field>,
12218    /// An object defining properties of the legend. If `null`, the legend for the encoding
12219    /// channel will be removed.
12220    ///
12221    /// __Default value:__ If undefined, default [legend
12222    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
12223    ///
12224    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
12225    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12226    #[builder(default)]
12227    pub legend: RemovableValue<Legend>,
12228    /// An object defining properties of the channel's scale, which is the function that
12229    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
12230    /// (pixels, colors, sizes) of the encoding channels.
12231    ///
12232    /// If `null`, the scale will be [disabled and the data value will be directly
12233    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
12234    ///
12235    /// __Default value:__ If undefined, default [scale
12236    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
12237    ///
12238    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
12239    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12240    #[builder(default)]
12241    pub scale: RemovableValue<Scale>,
12242    /// Sort order for the encoded field.
12243    ///
12244    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
12245    /// `"descending"`.
12246    ///
12247    /// For discrete fields, `sort` can be one of the following:
12248    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
12249    /// JavaScript.
12250    /// - [A string indicating an encoding channel name to sort
12251    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
12252    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
12253    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
12254    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
12255    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
12256    /// "descending"}`.
12257    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
12258    /// for sorting by another field.
12259    /// - [An array specifying the field values in preferred
12260    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
12261    /// sort order will obey the values in the array, followed by any unspecified values in their
12262    /// original order. For discrete time field, values in the sort array can be [date-time
12263    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
12264    /// the values can be the month or day names (case insensitive) or their 3-letter initials
12265    /// (e.g., `"Mon"`, `"Tue"`).
12266    /// - `null` indicating no sort.
12267    ///
12268    /// __Default value:__ `"ascending"`
12269    ///
12270    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
12271    ///
12272    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
12273    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12274    #[builder(default)]
12275    pub sort: RemovableValue<SortUnion>,
12276    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
12277    /// temporal field that gets casted as
12278    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
12279    ///
12280    /// __Default value:__ `undefined` (None)
12281    ///
12282    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
12283    /// documentation.
12284    #[serde(skip_serializing_if = "Option::is_none")]
12285    #[builder(default)]
12286    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
12287    /// A title for the field. If `null`, the title will be removed.
12288    ///
12289    /// __Default value:__  derived from the field's name and transformation function
12290    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
12291    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
12292    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
12293    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
12294    /// name.
12295    ///
12296    /// __Notes__:
12297    ///
12298    /// 1) You can customize the default field title format by providing the
12299    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
12300    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
12301    /// [`fieldTitle` function via the `compile` function's
12302    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
12303    ///
12304    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
12305    /// axis/header/legend title will be used.
12306    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12307    #[builder(default)]
12308    pub title: RemovableValue<LegendText>,
12309    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
12310    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
12311    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
12312    ///
12313    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
12314    /// is required for a field if: (1) the field is not nominal and the field encoding has no
12315    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
12316    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
12317    /// or `timeUnit`.
12318    ///
12319    /// __Default value:__
12320    ///
12321    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
12322    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
12323    /// following criteria:
12324    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
12325    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
12326    /// `longitude` channel or (3) if the specified scale type is [a quantitative
12327    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
12328    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
12329    /// the specified scale type is a time or utc scale
12330    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
12331    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
12332    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
12333    /// `order`.
12334    ///
12335    /// 2) For a constant value in data domain (`datum`):
12336    /// - `"quantitative"` if the datum is a number
12337    /// - `"nominal"` if the datum is a string
12338    /// - `"temporal"` if the datum is [a date time
12339    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
12340    ///
12341    /// __Note:__
12342    /// - Data `type` describes the semantics of the data rather than the primitive data types
12343    /// (number, string, etc.). The same primitive data type can have different types of
12344    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
12345    /// data.
12346    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
12347    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
12348    /// `1552199579097`).
12349    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
12350    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
12351    /// (for using an ordinal bin
12352    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
12353    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
12354    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
12355    /// [`"ordinal"` (for using an ordinal
12356    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
12357    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
12358    /// the `type` property refers to the post-aggregation data type. For example, we can
12359    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
12360    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
12361    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
12362    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
12363    ///
12364    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
12365    #[serde(rename = "type")]
12366    #[serde(skip_serializing_if = "Option::is_none")]
12367    #[builder(default)]
12368    pub mark_prop_def_number_type: Option<Type>,
12369    /// A constant value in data domain.
12370    #[serde(skip_serializing_if = "Option::is_none")]
12371    #[builder(default)]
12372    pub datum: Option<PrimitiveValue>,
12373    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
12374    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
12375    /// between `0` to `1` for opacity).
12376    #[serde(skip_serializing_if = "Option::is_none")]
12377    #[builder(default)]
12378    pub value: Option<CornerRadiusUnion>,
12379}
12380
12381/// Text of the `text` mark.
12382///
12383/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
12384#[derive(Debug, Clone, Serialize, Deserialize)]
12385#[serde(rename_all = "camelCase")]
12386#[derive(Default, Builder)]
12387#[builder(setter(into, strip_option))]
12388pub struct TextDef {
12389    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
12390    /// `"max"`, `"count"`).
12391    ///
12392    /// __Default value:__ `undefined` (None)
12393    ///
12394    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
12395    /// documentation.
12396    #[serde(skip_serializing_if = "Option::is_none")]
12397    #[builder(default)]
12398    pub aggregate: Option<Aggregate>,
12399    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
12400    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
12401    /// middle of the band if set to `0.5`.
12402    #[serde(skip_serializing_if = "Option::is_none")]
12403    #[builder(default)]
12404    pub band_position: Option<f64>,
12405    /// A flag for binning a `quantitative` field, [an object defining binning
12406    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
12407    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
12408    /// (`"binned"`).
12409    ///
12410    /// - If `true`, default [binning
12411    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
12412    /// applied.
12413    ///
12414    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
12415    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
12416    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
12417    /// the axis ticks based on the bin step, you can also set the axis's
12418    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
12419    ///
12420    /// __Default value:__ `false`
12421    ///
12422    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
12423    #[serde(skip_serializing_if = "Option::is_none")]
12424    #[builder(default)]
12425    pub bin: Option<DescriptionBin>,
12426    /// One or more value definition(s) with [a parameter or a test
12427    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
12428    ///
12429    /// __Note:__ A field definition's `condition` property can only contain [conditional value
12430    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
12431    /// only allows at most one encoded field per encoding channel.
12432    ///
12433    /// A field definition or one or more value definition(s) with a parameter predicate.
12434    #[serde(skip_serializing_if = "Option::is_none")]
12435    #[builder(default)]
12436    pub condition: Option<TextCondition>,
12437    /// __Required.__ A string defining the name of the field from which to pull a data value or
12438    /// an object defining iterated values from the
12439    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
12440    ///
12441    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
12442    ///
12443    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
12444    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
12445    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
12446    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
12447    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
12448    /// required if `aggregate` is `count`.
12449    #[serde(skip_serializing_if = "Option::is_none")]
12450    #[builder(default)]
12451    pub field: Option<Field>,
12452    /// When used with the default `"number"` and `"time"` format type, the text formatting
12453    /// pattern for labels of guides (axes, legends, headers) and text marks.
12454    ///
12455    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
12456    /// format pattern](https://github.com/d3/d3-format#locale_format).
12457    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
12458    /// pattern](https://github.com/d3/d3-time-format#locale_format).
12459    ///
12460    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
12461    /// more examples.
12462    ///
12463    /// When used with a [custom
12464    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
12465    /// value will be passed as `format` alongside `datum.value` to the registered function.
12466    ///
12467    /// __Default value:__  Derived from
12468    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
12469    /// number format and from
12470    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
12471    /// format.
12472    #[serde(skip_serializing_if = "Option::is_none")]
12473    #[builder(default)]
12474    pub format: Option<Format>,
12475    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
12476    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
12477    ///
12478    /// __Default value:__
12479    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
12480    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
12481    /// `timeUnit`.
12482    #[serde(skip_serializing_if = "Option::is_none")]
12483    #[builder(default)]
12484    pub format_type: Option<String>,
12485    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
12486    /// temporal field that gets casted as
12487    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
12488    ///
12489    /// __Default value:__ `undefined` (None)
12490    ///
12491    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
12492    /// documentation.
12493    #[serde(skip_serializing_if = "Option::is_none")]
12494    #[builder(default)]
12495    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
12496    /// A title for the field. If `null`, the title will be removed.
12497    ///
12498    /// __Default value:__  derived from the field's name and transformation function
12499    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
12500    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
12501    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
12502    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
12503    /// name.
12504    ///
12505    /// __Notes__:
12506    ///
12507    /// 1) You can customize the default field title format by providing the
12508    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
12509    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
12510    /// [`fieldTitle` function via the `compile` function's
12511    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
12512    ///
12513    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
12514    /// axis/header/legend title will be used.
12515    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12516    #[builder(default)]
12517    pub title: RemovableValue<LegendText>,
12518    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
12519    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
12520    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
12521    ///
12522    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
12523    /// is required for a field if: (1) the field is not nominal and the field encoding has no
12524    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
12525    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
12526    /// or `timeUnit`.
12527    ///
12528    /// __Default value:__
12529    ///
12530    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
12531    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
12532    /// following criteria:
12533    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
12534    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
12535    /// `longitude` channel or (3) if the specified scale type is [a quantitative
12536    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
12537    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
12538    /// the specified scale type is a time or utc scale
12539    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
12540    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
12541    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
12542    /// `order`.
12543    ///
12544    /// 2) For a constant value in data domain (`datum`):
12545    /// - `"quantitative"` if the datum is a number
12546    /// - `"nominal"` if the datum is a string
12547    /// - `"temporal"` if the datum is [a date time
12548    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
12549    ///
12550    /// __Note:__
12551    /// - Data `type` describes the semantics of the data rather than the primitive data types
12552    /// (number, string, etc.). The same primitive data type can have different types of
12553    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
12554    /// data.
12555    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
12556    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
12557    /// `1552199579097`).
12558    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
12559    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
12560    /// (for using an ordinal bin
12561    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
12562    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
12563    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
12564    /// [`"ordinal"` (for using an ordinal
12565    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
12566    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
12567    /// the `type` property refers to the post-aggregation data type. For example, we can
12568    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
12569    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
12570    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
12571    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
12572    ///
12573    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
12574    #[serde(rename = "type")]
12575    #[serde(skip_serializing_if = "Option::is_none")]
12576    #[builder(default)]
12577    pub text_def_type: Option<Type>,
12578    /// A constant value in data domain.
12579    #[serde(skip_serializing_if = "Option::is_none")]
12580    #[builder(default)]
12581    pub datum: Option<PrimitiveValue>,
12582    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
12583    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
12584    /// between `0` to `1` for opacity).
12585    #[serde(skip_serializing_if = "Option::is_none")]
12586    #[builder(default)]
12587    pub value: Option<ConditionalPredicateValueDefTextExprRefText>,
12588}
12589
12590#[derive(Debug, Clone, Serialize, Deserialize)]
12591#[serde(untagged)]
12592#[derive(From)]
12593pub enum TextCondition {
12594    ConditionalP(ConditionalP),
12595    ConditionalValueDefTextExprRefArray(Vec<ConditionalValueDefTextExprRef>),
12596}
12597
12598#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
12599#[builder(setter(into, strip_option))]
12600pub struct ConditionalValueDefTextExprRef {
12601    /// Predicate for triggering the condition
12602    #[serde(skip_serializing_if = "Option::is_none")]
12603    #[builder(default)]
12604    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
12605    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
12606    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
12607    /// between `0` to `1` for opacity).
12608    #[serde(skip_serializing_if = "Option::is_none")]
12609    #[builder(default)]
12610    pub value: Option<ConditionalValueDefTextExprRefText>,
12611    /// For selection parameters, the predicate of empty selections returns true by default.
12612    /// Override this behavior, by setting this property `empty: false`.
12613    #[serde(skip_serializing_if = "Option::is_none")]
12614    #[builder(default)]
12615    pub empty: Option<bool>,
12616    /// Filter using a parameter name.
12617    #[serde(skip_serializing_if = "Option::is_none")]
12618    #[builder(default)]
12619    pub param: Option<String>,
12620}
12621
12622/// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
12623/// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
12624/// between `0` to `1` for opacity).
12625///
12626/// The title text.
12627#[derive(Debug, Clone, Serialize, Deserialize)]
12628#[serde(untagged)]
12629#[derive(From)]
12630pub enum ConditionalValueDefTextExprRefText {
12631    BackgroundExprRef(BackgroundExprRef),
12632    String(String),
12633    StringArray(Vec<String>),
12634}
12635
12636#[derive(Debug, Clone, Serialize, Deserialize)]
12637#[serde(rename_all = "camelCase")]
12638#[derive(Default, Builder)]
12639#[builder(setter(into, strip_option))]
12640pub struct ConditionalP {
12641    /// Predicate for triggering the condition
12642    #[serde(skip_serializing_if = "Option::is_none")]
12643    #[builder(default)]
12644    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
12645    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
12646    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
12647    /// between `0` to `1` for opacity).
12648    #[serde(skip_serializing_if = "Option::is_none")]
12649    #[builder(default)]
12650    pub value: Option<ConditionalPredicateValueDefTextExprRefText>,
12651    /// For selection parameters, the predicate of empty selections returns true by default.
12652    /// Override this behavior, by setting this property `empty: false`.
12653    #[serde(skip_serializing_if = "Option::is_none")]
12654    #[builder(default)]
12655    pub empty: Option<bool>,
12656    /// Filter using a parameter name.
12657    #[serde(skip_serializing_if = "Option::is_none")]
12658    #[builder(default)]
12659    pub param: Option<String>,
12660    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
12661    /// `"max"`, `"count"`).
12662    ///
12663    /// __Default value:__ `undefined` (None)
12664    ///
12665    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
12666    /// documentation.
12667    #[serde(skip_serializing_if = "Option::is_none")]
12668    #[builder(default)]
12669    pub aggregate: Option<Aggregate>,
12670    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
12671    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
12672    /// middle of the band if set to `0.5`.
12673    #[serde(skip_serializing_if = "Option::is_none")]
12674    #[builder(default)]
12675    pub band_position: Option<f64>,
12676    /// A flag for binning a `quantitative` field, [an object defining binning
12677    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
12678    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
12679    /// (`"binned"`).
12680    ///
12681    /// - If `true`, default [binning
12682    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
12683    /// applied.
12684    ///
12685    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
12686    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
12687    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
12688    /// the axis ticks based on the bin step, you can also set the axis's
12689    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
12690    ///
12691    /// __Default value:__ `false`
12692    ///
12693    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
12694    #[serde(skip_serializing_if = "Option::is_none")]
12695    #[builder(default)]
12696    pub bin: Option<DescriptionBin>,
12697    /// __Required.__ A string defining the name of the field from which to pull a data value or
12698    /// an object defining iterated values from the
12699    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
12700    ///
12701    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
12702    ///
12703    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
12704    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
12705    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
12706    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
12707    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
12708    /// required if `aggregate` is `count`.
12709    #[serde(skip_serializing_if = "Option::is_none")]
12710    #[builder(default)]
12711    pub field: Option<Field>,
12712    /// When used with the default `"number"` and `"time"` format type, the text formatting
12713    /// pattern for labels of guides (axes, legends, headers) and text marks.
12714    ///
12715    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
12716    /// format pattern](https://github.com/d3/d3-format#locale_format).
12717    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
12718    /// pattern](https://github.com/d3/d3-time-format#locale_format).
12719    ///
12720    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
12721    /// more examples.
12722    ///
12723    /// When used with a [custom
12724    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
12725    /// value will be passed as `format` alongside `datum.value` to the registered function.
12726    ///
12727    /// __Default value:__  Derived from
12728    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
12729    /// number format and from
12730    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
12731    /// format.
12732    #[serde(skip_serializing_if = "Option::is_none")]
12733    #[builder(default)]
12734    pub format: Option<Format>,
12735    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
12736    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
12737    ///
12738    /// __Default value:__
12739    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
12740    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
12741    /// `timeUnit`.
12742    #[serde(skip_serializing_if = "Option::is_none")]
12743    #[builder(default)]
12744    pub format_type: Option<String>,
12745    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
12746    /// temporal field that gets casted as
12747    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
12748    ///
12749    /// __Default value:__ `undefined` (None)
12750    ///
12751    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
12752    /// documentation.
12753    #[serde(skip_serializing_if = "Option::is_none")]
12754    #[builder(default)]
12755    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
12756    /// A title for the field. If `null`, the title will be removed.
12757    ///
12758    /// __Default value:__  derived from the field's name and transformation function
12759    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
12760    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
12761    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
12762    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
12763    /// name.
12764    ///
12765    /// __Notes__:
12766    ///
12767    /// 1) You can customize the default field title format by providing the
12768    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
12769    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
12770    /// [`fieldTitle` function via the `compile` function's
12771    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
12772    ///
12773    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
12774    /// axis/header/legend title will be used.
12775    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12776    #[builder(default)]
12777    pub title: RemovableValue<LegendText>,
12778    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
12779    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
12780    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
12781    ///
12782    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
12783    /// is required for a field if: (1) the field is not nominal and the field encoding has no
12784    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
12785    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
12786    /// or `timeUnit`.
12787    ///
12788    /// __Default value:__
12789    ///
12790    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
12791    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
12792    /// following criteria:
12793    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
12794    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
12795    /// `longitude` channel or (3) if the specified scale type is [a quantitative
12796    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
12797    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
12798    /// the specified scale type is a time or utc scale
12799    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
12800    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
12801    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
12802    /// `order`.
12803    ///
12804    /// 2) For a constant value in data domain (`datum`):
12805    /// - `"quantitative"` if the datum is a number
12806    /// - `"nominal"` if the datum is a string
12807    /// - `"temporal"` if the datum is [a date time
12808    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
12809    ///
12810    /// __Note:__
12811    /// - Data `type` describes the semantics of the data rather than the primitive data types
12812    /// (number, string, etc.). The same primitive data type can have different types of
12813    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
12814    /// data.
12815    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
12816    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
12817    /// `1552199579097`).
12818    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
12819    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
12820    /// (for using an ordinal bin
12821    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
12822    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
12823    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
12824    /// [`"ordinal"` (for using an ordinal
12825    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
12826    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
12827    /// the `type` property refers to the post-aggregation data type. For example, we can
12828    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
12829    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
12830    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
12831    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
12832    ///
12833    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
12834    #[serde(rename = "type")]
12835    #[serde(skip_serializing_if = "Option::is_none")]
12836    #[builder(default)]
12837    pub conditional_p_type: Option<StandardType>,
12838}
12839
12840/// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
12841/// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
12842/// between `0` to `1` for opacity).
12843///
12844/// The title text.
12845#[derive(Debug, Clone, Serialize, Deserialize)]
12846#[serde(untagged)]
12847#[derive(From)]
12848pub enum ConditionalPredicateValueDefTextExprRefText {
12849    BackgroundExprRef(BackgroundExprRef),
12850    String(String),
12851    StringArray(Vec<String>),
12852}
12853
12854/// The outer radius in pixels of arc marks.
12855///
12856/// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
12857/// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
12858/// clockwise.)
12859///
12860/// - For text marks, polar coordinate angle in radians.
12861///
12862/// Definition object for a constant value (primitive value or gradient definition) of an
12863/// encoding channel.
12864#[derive(Debug, Clone, Serialize, Deserialize)]
12865#[serde(rename_all = "camelCase")]
12866#[derive(Default, Builder)]
12867#[builder(setter(into, strip_option))]
12868pub struct ThetaClass {
12869    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
12870    /// `"max"`, `"count"`).
12871    ///
12872    /// __Default value:__ `undefined` (None)
12873    ///
12874    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
12875    /// documentation.
12876    #[serde(skip_serializing_if = "Option::is_none")]
12877    #[builder(default)]
12878    pub aggregate: Option<Aggregate>,
12879    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
12880    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
12881    /// middle of the band if set to `0.5`.
12882    #[serde(skip_serializing_if = "Option::is_none")]
12883    #[builder(default)]
12884    pub band_position: Option<f64>,
12885    /// A flag for binning a `quantitative` field, [an object defining binning
12886    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
12887    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
12888    /// (`"binned"`).
12889    ///
12890    /// - If `true`, default [binning
12891    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
12892    /// applied.
12893    ///
12894    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
12895    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
12896    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
12897    /// the axis ticks based on the bin step, you can also set the axis's
12898    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
12899    ///
12900    /// __Default value:__ `false`
12901    ///
12902    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
12903    #[serde(skip_serializing_if = "Option::is_none")]
12904    #[builder(default)]
12905    pub bin: Option<DescriptionBin>,
12906    /// __Required.__ A string defining the name of the field from which to pull a data value or
12907    /// an object defining iterated values from the
12908    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
12909    ///
12910    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
12911    ///
12912    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
12913    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
12914    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
12915    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
12916    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
12917    /// required if `aggregate` is `count`.
12918    #[serde(skip_serializing_if = "Option::is_none")]
12919    #[builder(default)]
12920    pub field: Option<Field>,
12921    /// An object defining properties of the channel's scale, which is the function that
12922    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
12923    /// (pixels, colors, sizes) of the encoding channels.
12924    ///
12925    /// If `null`, the scale will be [disabled and the data value will be directly
12926    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
12927    ///
12928    /// __Default value:__ If undefined, default [scale
12929    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
12930    ///
12931    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
12932    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12933    #[builder(default)]
12934    pub scale: RemovableValue<Scale>,
12935    /// Sort order for the encoded field.
12936    ///
12937    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
12938    /// `"descending"`.
12939    ///
12940    /// For discrete fields, `sort` can be one of the following:
12941    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
12942    /// JavaScript.
12943    /// - [A string indicating an encoding channel name to sort
12944    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
12945    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
12946    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
12947    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
12948    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
12949    /// "descending"}`.
12950    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
12951    /// for sorting by another field.
12952    /// - [An array specifying the field values in preferred
12953    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
12954    /// sort order will obey the values in the array, followed by any unspecified values in their
12955    /// original order. For discrete time field, values in the sort array can be [date-time
12956    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
12957    /// the values can be the month or day names (case insensitive) or their 3-letter initials
12958    /// (e.g., `"Mon"`, `"Tue"`).
12959    /// - `null` indicating no sort.
12960    ///
12961    /// __Default value:__ `"ascending"`
12962    ///
12963    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
12964    ///
12965    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
12966    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
12967    #[builder(default)]
12968    pub sort: RemovableValue<SortUnion>,
12969    /// Type of stacking offset if the field should be stacked. `stack` is only applicable for
12970    /// `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of
12971    /// `y` can be used to customize stacking for a vertical bar chart.
12972    ///
12973    /// `stack` can be one of the following values:
12974    /// - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for
12975    /// creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and
12976    /// [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).
12977    /// - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar
12978    /// and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie
12979    /// charts [with percentage
12980    /// tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>
12981    /// -`"center"` - stacking with center baseline (for
12982    /// [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).
12983    /// - `null` or `false` - No-stacking. This will produce layered
12984    /// [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area
12985    /// chart.
12986    ///
12987    /// __Default value:__ `zero` for plots with all of the following conditions are true: (1)
12988    /// the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a
12989    /// linear scale; (3) At least one of non-position channels mapped to an unaggregated field
12990    /// that is different from x and y. Otherwise, `null` by default.
12991    ///
12992    /// __See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.
12993    #[serde(skip_serializing_if = "Option::is_none")]
12994    #[builder(default)]
12995    pub stack: Option<Stack>,
12996    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
12997    /// temporal field that gets casted as
12998    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
12999    ///
13000    /// __Default value:__ `undefined` (None)
13001    ///
13002    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
13003    /// documentation.
13004    #[serde(skip_serializing_if = "Option::is_none")]
13005    #[builder(default)]
13006    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
13007    /// A title for the field. If `null`, the title will be removed.
13008    ///
13009    /// __Default value:__  derived from the field's name and transformation function
13010    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
13011    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
13012    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
13013    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
13014    /// name.
13015    ///
13016    /// __Notes__:
13017    ///
13018    /// 1) You can customize the default field title format by providing the
13019    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
13020    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
13021    /// [`fieldTitle` function via the `compile` function's
13022    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
13023    ///
13024    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
13025    /// axis/header/legend title will be used.
13026    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
13027    #[builder(default)]
13028    pub title: RemovableValue<LegendText>,
13029    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
13030    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
13031    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
13032    ///
13033    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
13034    /// is required for a field if: (1) the field is not nominal and the field encoding has no
13035    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
13036    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
13037    /// or `timeUnit`.
13038    ///
13039    /// __Default value:__
13040    ///
13041    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
13042    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
13043    /// following criteria:
13044    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
13045    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
13046    /// `longitude` channel or (3) if the specified scale type is [a quantitative
13047    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
13048    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
13049    /// the specified scale type is a time or utc scale
13050    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
13051    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
13052    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
13053    /// `order`.
13054    ///
13055    /// 2) For a constant value in data domain (`datum`):
13056    /// - `"quantitative"` if the datum is a number
13057    /// - `"nominal"` if the datum is a string
13058    /// - `"temporal"` if the datum is [a date time
13059    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
13060    ///
13061    /// __Note:__
13062    /// - Data `type` describes the semantics of the data rather than the primitive data types
13063    /// (number, string, etc.). The same primitive data type can have different types of
13064    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
13065    /// data.
13066    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
13067    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
13068    /// `1552199579097`).
13069    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
13070    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
13071    /// (for using an ordinal bin
13072    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13073    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
13074    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
13075    /// [`"ordinal"` (for using an ordinal
13076    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13077    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
13078    /// the `type` property refers to the post-aggregation data type. For example, we can
13079    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
13080    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
13081    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
13082    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
13083    ///
13084    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
13085    #[serde(rename = "type")]
13086    #[serde(skip_serializing_if = "Option::is_none")]
13087    #[builder(default)]
13088    pub polar_def_type: Option<Type>,
13089    /// A constant value in data domain.
13090    #[serde(skip_serializing_if = "Option::is_none")]
13091    #[builder(default)]
13092    pub datum: Option<PrimitiveValue>,
13093    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
13094    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
13095    /// between `0` to `1` for opacity).
13096    #[serde(skip_serializing_if = "Option::is_none")]
13097    #[builder(default)]
13098    pub value: Option<Latitude2Value>,
13099}
13100
13101/// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
13102/// `"rule"`.
13103///
13104/// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
13105/// and  `"rule"`.
13106///
13107/// The inner radius in pixels of arc marks.
13108///
13109/// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
13110/// values proceed clockwise.
13111///
13112/// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
13113///
13114/// The `value` of this channel can be a number or a string `"width"` for the width of the
13115/// plot.
13116///
13117/// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
13118///
13119/// The `value` of this channel can be a number or a string `"height"` for the height of the
13120/// plot.
13121///
13122/// A field definition of a secondary channel that shares a scale with another primary
13123/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
13124///
13125/// Definition object for a constant value (primitive value or gradient definition) of an
13126/// encoding channel.
13127#[derive(Debug, Clone, Serialize, Deserialize)]
13128#[serde(rename_all = "camelCase")]
13129#[derive(Default, Builder)]
13130#[builder(setter(into, strip_option))]
13131pub struct Theta2Class {
13132    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
13133    /// `"max"`, `"count"`).
13134    ///
13135    /// __Default value:__ `undefined` (None)
13136    ///
13137    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
13138    /// documentation.
13139    #[serde(skip_serializing_if = "Option::is_none")]
13140    #[builder(default)]
13141    pub aggregate: Option<Aggregate>,
13142    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
13143    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
13144    /// middle of the band if set to `0.5`.
13145    #[serde(skip_serializing_if = "Option::is_none")]
13146    #[builder(default)]
13147    pub band_position: Option<f64>,
13148    /// A flag for binning a `quantitative` field, [an object defining binning
13149    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
13150    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
13151    /// (`"binned"`).
13152    ///
13153    /// - If `true`, default [binning
13154    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
13155    /// applied.
13156    ///
13157    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
13158    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
13159    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
13160    /// the axis ticks based on the bin step, you can also set the axis's
13161    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
13162    ///
13163    /// __Default value:__ `false`
13164    ///
13165    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
13166    #[serde(skip_serializing_if = "Option::is_none")]
13167    #[builder(default)]
13168    pub bin: Option<serde_json::Value>,
13169    /// __Required.__ A string defining the name of the field from which to pull a data value or
13170    /// an object defining iterated values from the
13171    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
13172    ///
13173    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
13174    ///
13175    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
13176    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
13177    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
13178    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
13179    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
13180    /// required if `aggregate` is `count`.
13181    #[serde(skip_serializing_if = "Option::is_none")]
13182    #[builder(default)]
13183    pub field: Option<Field>,
13184    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
13185    /// temporal field that gets casted as
13186    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
13187    ///
13188    /// __Default value:__ `undefined` (None)
13189    ///
13190    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
13191    /// documentation.
13192    #[serde(skip_serializing_if = "Option::is_none")]
13193    #[builder(default)]
13194    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
13195    /// A title for the field. If `null`, the title will be removed.
13196    ///
13197    /// __Default value:__  derived from the field's name and transformation function
13198    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
13199    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
13200    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
13201    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
13202    /// name.
13203    ///
13204    /// __Notes__:
13205    ///
13206    /// 1) You can customize the default field title format by providing the
13207    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
13208    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
13209    /// [`fieldTitle` function via the `compile` function's
13210    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
13211    ///
13212    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
13213    /// axis/header/legend title will be used.
13214    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
13215    #[builder(default)]
13216    pub title: RemovableValue<LegendText>,
13217    /// A constant value in data domain.
13218    #[serde(skip_serializing_if = "Option::is_none")]
13219    #[builder(default)]
13220    pub datum: Option<PrimitiveValue>,
13221    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
13222    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
13223    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
13224    ///
13225    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
13226    /// is required for a field if: (1) the field is not nominal and the field encoding has no
13227    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
13228    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
13229    /// or `timeUnit`.
13230    ///
13231    /// __Default value:__
13232    ///
13233    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
13234    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
13235    /// following criteria:
13236    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
13237    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
13238    /// `longitude` channel or (3) if the specified scale type is [a quantitative
13239    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
13240    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
13241    /// the specified scale type is a time or utc scale
13242    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
13243    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
13244    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
13245    /// `order`.
13246    ///
13247    /// 2) For a constant value in data domain (`datum`):
13248    /// - `"quantitative"` if the datum is a number
13249    /// - `"nominal"` if the datum is a string
13250    /// - `"temporal"` if the datum is [a date time
13251    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
13252    ///
13253    /// __Note:__
13254    /// - Data `type` describes the semantics of the data rather than the primitive data types
13255    /// (number, string, etc.). The same primitive data type can have different types of
13256    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
13257    /// data.
13258    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
13259    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
13260    /// `1552199579097`).
13261    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
13262    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
13263    /// (for using an ordinal bin
13264    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13265    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
13266    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
13267    /// [`"ordinal"` (for using an ordinal
13268    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13269    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
13270    /// the `type` property refers to the post-aggregation data type. For example, we can
13271    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
13272    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
13273    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
13274    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
13275    ///
13276    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
13277    #[serde(rename = "type")]
13278    #[serde(skip_serializing_if = "Option::is_none")]
13279    #[builder(default)]
13280    pub position2_def_type: Option<Type>,
13281    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
13282    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
13283    /// between `0` to `1` for opacity).
13284    #[serde(skip_serializing_if = "Option::is_none")]
13285    #[builder(default)]
13286    pub value: Option<Latitude2Value>,
13287}
13288
13289#[derive(Debug, Clone, Serialize, Deserialize)]
13290#[serde(rename_all = "camelCase")]
13291#[derive(Default, Builder)]
13292#[builder(setter(into, strip_option))]
13293pub struct TimeFieldDef {
13294    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
13295    /// `"max"`, `"count"`).
13296    ///
13297    /// __Default value:__ `undefined` (None)
13298    ///
13299    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
13300    /// documentation.
13301    #[serde(skip_serializing_if = "Option::is_none")]
13302    #[builder(default)]
13303    pub aggregate: Option<Aggregate>,
13304    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
13305    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
13306    /// middle of the band if set to `0.5`.
13307    #[serde(skip_serializing_if = "Option::is_none")]
13308    #[builder(default)]
13309    pub band_position: Option<f64>,
13310    /// A flag for binning a `quantitative` field, [an object defining binning
13311    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
13312    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
13313    /// (`"binned"`).
13314    ///
13315    /// - If `true`, default [binning
13316    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
13317    /// applied.
13318    ///
13319    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
13320    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
13321    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
13322    /// the axis ticks based on the bin step, you can also set the axis's
13323    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
13324    ///
13325    /// __Default value:__ `false`
13326    ///
13327    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
13328    #[serde(skip_serializing_if = "Option::is_none")]
13329    #[builder(default)]
13330    pub bin: Option<AngleBin>,
13331    /// __Required.__ A string defining the name of the field from which to pull a data value or
13332    /// an object defining iterated values from the
13333    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
13334    ///
13335    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
13336    ///
13337    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
13338    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
13339    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
13340    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
13341    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
13342    /// required if `aggregate` is `count`.
13343    #[serde(skip_serializing_if = "Option::is_none")]
13344    #[builder(default)]
13345    pub field: Option<Field>,
13346    #[serde(skip_serializing_if = "Option::is_none")]
13347    #[builder(default)]
13348    pub rescale: Option<bool>,
13349    /// An object defining properties of the channel's scale, which is the function that
13350    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
13351    /// (pixels, colors, sizes) of the encoding channels.
13352    ///
13353    /// If `null`, the scale will be [disabled and the data value will be directly
13354    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
13355    ///
13356    /// __Default value:__ If undefined, default [scale
13357    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
13358    ///
13359    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
13360    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
13361    #[builder(default)]
13362    pub scale: RemovableValue<Scale>,
13363    /// Sort order for the encoded field.
13364    ///
13365    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
13366    /// `"descending"`.
13367    ///
13368    /// For discrete fields, `sort` can be one of the following:
13369    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
13370    /// JavaScript.
13371    /// - [A string indicating an encoding channel name to sort
13372    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
13373    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
13374    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
13375    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
13376    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
13377    /// "descending"}`.
13378    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
13379    /// for sorting by another field.
13380    /// - [An array specifying the field values in preferred
13381    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
13382    /// sort order will obey the values in the array, followed by any unspecified values in their
13383    /// original order. For discrete time field, values in the sort array can be [date-time
13384    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
13385    /// the values can be the month or day names (case insensitive) or their 3-letter initials
13386    /// (e.g., `"Mon"`, `"Tue"`).
13387    /// - `null` indicating no sort.
13388    ///
13389    /// __Default value:__ `"ascending"`
13390    ///
13391    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
13392    ///
13393    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
13394    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
13395    #[builder(default)]
13396    pub sort: RemovableValue<SortUnion>,
13397    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
13398    /// temporal field that gets casted as
13399    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
13400    ///
13401    /// __Default value:__ `undefined` (None)
13402    ///
13403    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
13404    /// documentation.
13405    #[serde(skip_serializing_if = "Option::is_none")]
13406    #[builder(default)]
13407    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
13408    /// A title for the field. If `null`, the title will be removed.
13409    ///
13410    /// __Default value:__  derived from the field's name and transformation function
13411    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
13412    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
13413    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
13414    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
13415    /// name.
13416    ///
13417    /// __Notes__:
13418    ///
13419    /// 1) You can customize the default field title format by providing the
13420    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
13421    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
13422    /// [`fieldTitle` function via the `compile` function's
13423    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
13424    ///
13425    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
13426    /// axis/header/legend title will be used.
13427    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
13428    #[builder(default)]
13429    pub title: RemovableValue<LegendText>,
13430    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
13431    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
13432    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
13433    ///
13434    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
13435    /// is required for a field if: (1) the field is not nominal and the field encoding has no
13436    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
13437    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
13438    /// or `timeUnit`.
13439    ///
13440    /// __Default value:__
13441    ///
13442    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
13443    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
13444    /// following criteria:
13445    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
13446    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
13447    /// `longitude` channel or (3) if the specified scale type is [a quantitative
13448    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
13449    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
13450    /// the specified scale type is a time or utc scale
13451    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
13452    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
13453    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
13454    /// `order`.
13455    ///
13456    /// 2) For a constant value in data domain (`datum`):
13457    /// - `"quantitative"` if the datum is a number
13458    /// - `"nominal"` if the datum is a string
13459    /// - `"temporal"` if the datum is [a date time
13460    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
13461    ///
13462    /// __Note:__
13463    /// - Data `type` describes the semantics of the data rather than the primitive data types
13464    /// (number, string, etc.). The same primitive data type can have different types of
13465    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
13466    /// data.
13467    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
13468    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
13469    /// `1552199579097`).
13470    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
13471    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
13472    /// (for using an ordinal bin
13473    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13474    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
13475    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
13476    /// [`"ordinal"` (for using an ordinal
13477    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13478    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
13479    /// the `type` property refers to the post-aggregation data type. For example, we can
13480    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
13481    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
13482    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
13483    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
13484    ///
13485    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
13486    #[serde(rename = "type")]
13487    #[serde(skip_serializing_if = "Option::is_none")]
13488    #[builder(default)]
13489    pub time_field_def_type: Option<StandardType>,
13490}
13491
13492#[derive(Debug, Clone, Serialize, Deserialize)]
13493#[serde(untagged)]
13494#[derive(From)]
13495pub enum EncodingTooltip {
13496    FieldOrDatumDefWithConditionStringFieldDefString(
13497        FieldOrDatumDefWithConditionStringFieldDefString,
13498    ),
13499    StringFieldDefArray(Vec<StringFieldDef>),
13500}
13501
13502#[derive(Debug, Clone, Serialize, Deserialize)]
13503#[serde(rename_all = "camelCase")]
13504#[derive(Default, Builder)]
13505#[builder(setter(into, strip_option))]
13506pub struct StringFieldDef {
13507    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
13508    /// `"max"`, `"count"`).
13509    ///
13510    /// __Default value:__ `undefined` (None)
13511    ///
13512    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
13513    /// documentation.
13514    #[serde(skip_serializing_if = "Option::is_none")]
13515    #[builder(default)]
13516    pub aggregate: Option<Aggregate>,
13517    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
13518    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
13519    /// middle of the band if set to `0.5`.
13520    #[serde(skip_serializing_if = "Option::is_none")]
13521    #[builder(default)]
13522    pub band_position: Option<f64>,
13523    /// A flag for binning a `quantitative` field, [an object defining binning
13524    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
13525    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
13526    /// (`"binned"`).
13527    ///
13528    /// - If `true`, default [binning
13529    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
13530    /// applied.
13531    ///
13532    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
13533    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
13534    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
13535    /// the axis ticks based on the bin step, you can also set the axis's
13536    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
13537    ///
13538    /// __Default value:__ `false`
13539    ///
13540    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
13541    #[serde(skip_serializing_if = "Option::is_none")]
13542    #[builder(default)]
13543    pub bin: Option<DescriptionBin>,
13544    /// __Required.__ A string defining the name of the field from which to pull a data value or
13545    /// an object defining iterated values from the
13546    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
13547    ///
13548    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
13549    ///
13550    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
13551    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
13552    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
13553    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
13554    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
13555    /// required if `aggregate` is `count`.
13556    #[serde(skip_serializing_if = "Option::is_none")]
13557    #[builder(default)]
13558    pub field: Option<Field>,
13559    /// When used with the default `"number"` and `"time"` format type, the text formatting
13560    /// pattern for labels of guides (axes, legends, headers) and text marks.
13561    ///
13562    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
13563    /// format pattern](https://github.com/d3/d3-format#locale_format).
13564    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
13565    /// pattern](https://github.com/d3/d3-time-format#locale_format).
13566    ///
13567    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
13568    /// more examples.
13569    ///
13570    /// When used with a [custom
13571    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
13572    /// value will be passed as `format` alongside `datum.value` to the registered function.
13573    ///
13574    /// __Default value:__  Derived from
13575    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
13576    /// number format and from
13577    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
13578    /// format.
13579    #[serde(skip_serializing_if = "Option::is_none")]
13580    #[builder(default)]
13581    pub format: Option<Format>,
13582    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
13583    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
13584    ///
13585    /// __Default value:__
13586    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
13587    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
13588    /// `timeUnit`.
13589    #[serde(skip_serializing_if = "Option::is_none")]
13590    #[builder(default)]
13591    pub format_type: Option<String>,
13592    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
13593    /// temporal field that gets casted as
13594    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
13595    ///
13596    /// __Default value:__ `undefined` (None)
13597    ///
13598    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
13599    /// documentation.
13600    #[serde(skip_serializing_if = "Option::is_none")]
13601    #[builder(default)]
13602    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
13603    /// A title for the field. If `null`, the title will be removed.
13604    ///
13605    /// __Default value:__  derived from the field's name and transformation function
13606    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
13607    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
13608    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
13609    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
13610    /// name.
13611    ///
13612    /// __Notes__:
13613    ///
13614    /// 1) You can customize the default field title format by providing the
13615    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
13616    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
13617    /// [`fieldTitle` function via the `compile` function's
13618    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
13619    ///
13620    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
13621    /// axis/header/legend title will be used.
13622    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
13623    #[builder(default)]
13624    pub title: RemovableValue<LegendText>,
13625    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
13626    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
13627    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
13628    ///
13629    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
13630    /// is required for a field if: (1) the field is not nominal and the field encoding has no
13631    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
13632    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
13633    /// or `timeUnit`.
13634    ///
13635    /// __Default value:__
13636    ///
13637    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
13638    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
13639    /// following criteria:
13640    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
13641    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
13642    /// `longitude` channel or (3) if the specified scale type is [a quantitative
13643    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
13644    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
13645    /// the specified scale type is a time or utc scale
13646    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
13647    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
13648    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
13649    /// `order`.
13650    ///
13651    /// 2) For a constant value in data domain (`datum`):
13652    /// - `"quantitative"` if the datum is a number
13653    /// - `"nominal"` if the datum is a string
13654    /// - `"temporal"` if the datum is [a date time
13655    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
13656    ///
13657    /// __Note:__
13658    /// - Data `type` describes the semantics of the data rather than the primitive data types
13659    /// (number, string, etc.). The same primitive data type can have different types of
13660    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
13661    /// data.
13662    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
13663    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
13664    /// `1552199579097`).
13665    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
13666    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
13667    /// (for using an ordinal bin
13668    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13669    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
13670    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
13671    /// [`"ordinal"` (for using an ordinal
13672    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13673    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
13674    /// the `type` property refers to the post-aggregation data type. For example, we can
13675    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
13676    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
13677    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
13678    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
13679    ///
13680    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
13681    #[serde(rename = "type")]
13682    #[serde(skip_serializing_if = "Option::is_none")]
13683    #[builder(default)]
13684    pub string_field_def_type: Option<StandardType>,
13685}
13686
13687/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
13688#[derive(Debug, Clone, Serialize, Deserialize)]
13689#[serde(rename_all = "camelCase")]
13690#[derive(Default, Builder)]
13691#[builder(setter(into, strip_option))]
13692pub struct FieldOrDatumDefWithConditionStringFieldDefString {
13693    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
13694    /// `"max"`, `"count"`).
13695    ///
13696    /// __Default value:__ `undefined` (None)
13697    ///
13698    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
13699    /// documentation.
13700    #[serde(skip_serializing_if = "Option::is_none")]
13701    #[builder(default)]
13702    pub aggregate: Option<Aggregate>,
13703    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
13704    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
13705    /// middle of the band if set to `0.5`.
13706    #[serde(skip_serializing_if = "Option::is_none")]
13707    #[builder(default)]
13708    pub band_position: Option<f64>,
13709    /// A flag for binning a `quantitative` field, [an object defining binning
13710    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
13711    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
13712    /// (`"binned"`).
13713    ///
13714    /// - If `true`, default [binning
13715    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
13716    /// applied.
13717    ///
13718    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
13719    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
13720    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
13721    /// the axis ticks based on the bin step, you can also set the axis's
13722    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
13723    ///
13724    /// __Default value:__ `false`
13725    ///
13726    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
13727    #[serde(skip_serializing_if = "Option::is_none")]
13728    #[builder(default)]
13729    pub bin: Option<DescriptionBin>,
13730    /// One or more value definition(s) with [a parameter or a test
13731    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
13732    ///
13733    /// __Note:__ A field definition's `condition` property can only contain [conditional value
13734    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
13735    /// only allows at most one encoded field per encoding channel.
13736    ///
13737    /// A field definition or one or more value definition(s) with a parameter predicate.
13738    #[serde(skip_serializing_if = "Option::is_none")]
13739    #[builder(default)]
13740    pub condition: Option<FieldOrDatumDefWithConditionStringFieldDefStringCondition>,
13741    /// __Required.__ A string defining the name of the field from which to pull a data value or
13742    /// an object defining iterated values from the
13743    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
13744    ///
13745    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
13746    ///
13747    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
13748    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
13749    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
13750    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
13751    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
13752    /// required if `aggregate` is `count`.
13753    #[serde(skip_serializing_if = "Option::is_none")]
13754    #[builder(default)]
13755    pub field: Option<Field>,
13756    /// When used with the default `"number"` and `"time"` format type, the text formatting
13757    /// pattern for labels of guides (axes, legends, headers) and text marks.
13758    ///
13759    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
13760    /// format pattern](https://github.com/d3/d3-format#locale_format).
13761    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
13762    /// pattern](https://github.com/d3/d3-time-format#locale_format).
13763    ///
13764    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
13765    /// more examples.
13766    ///
13767    /// When used with a [custom
13768    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
13769    /// value will be passed as `format` alongside `datum.value` to the registered function.
13770    ///
13771    /// __Default value:__  Derived from
13772    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
13773    /// number format and from
13774    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
13775    /// format.
13776    #[serde(skip_serializing_if = "Option::is_none")]
13777    #[builder(default)]
13778    pub format: Option<Format>,
13779    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
13780    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
13781    ///
13782    /// __Default value:__
13783    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
13784    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
13785    /// `timeUnit`.
13786    #[serde(skip_serializing_if = "Option::is_none")]
13787    #[builder(default)]
13788    pub format_type: Option<String>,
13789    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
13790    /// temporal field that gets casted as
13791    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
13792    ///
13793    /// __Default value:__ `undefined` (None)
13794    ///
13795    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
13796    /// documentation.
13797    #[serde(skip_serializing_if = "Option::is_none")]
13798    #[builder(default)]
13799    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
13800    /// A title for the field. If `null`, the title will be removed.
13801    ///
13802    /// __Default value:__  derived from the field's name and transformation function
13803    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
13804    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
13805    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
13806    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
13807    /// name.
13808    ///
13809    /// __Notes__:
13810    ///
13811    /// 1) You can customize the default field title format by providing the
13812    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
13813    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
13814    /// [`fieldTitle` function via the `compile` function's
13815    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
13816    ///
13817    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
13818    /// axis/header/legend title will be used.
13819    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
13820    #[builder(default)]
13821    pub title: RemovableValue<LegendText>,
13822    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
13823    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
13824    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
13825    ///
13826    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
13827    /// is required for a field if: (1) the field is not nominal and the field encoding has no
13828    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
13829    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
13830    /// or `timeUnit`.
13831    ///
13832    /// __Default value:__
13833    ///
13834    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
13835    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
13836    /// following criteria:
13837    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
13838    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
13839    /// `longitude` channel or (3) if the specified scale type is [a quantitative
13840    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
13841    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
13842    /// the specified scale type is a time or utc scale
13843    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
13844    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
13845    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
13846    /// `order`.
13847    ///
13848    /// 2) For a constant value in data domain (`datum`):
13849    /// - `"quantitative"` if the datum is a number
13850    /// - `"nominal"` if the datum is a string
13851    /// - `"temporal"` if the datum is [a date time
13852    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
13853    ///
13854    /// __Note:__
13855    /// - Data `type` describes the semantics of the data rather than the primitive data types
13856    /// (number, string, etc.). The same primitive data type can have different types of
13857    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
13858    /// data.
13859    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
13860    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
13861    /// `1552199579097`).
13862    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
13863    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
13864    /// (for using an ordinal bin
13865    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13866    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
13867    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
13868    /// [`"ordinal"` (for using an ordinal
13869    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
13870    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
13871    /// the `type` property refers to the post-aggregation data type. For example, we can
13872    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
13873    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
13874    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
13875    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
13876    ///
13877    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
13878    #[serde(rename = "type")]
13879    #[serde(skip_serializing_if = "Option::is_none")]
13880    #[builder(default)]
13881    pub field_or_datum_def_with_condition_string_field_def_string_type: Option<StandardType>,
13882    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
13883    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
13884    /// between `0` to `1` for opacity).
13885    #[serde(skip_serializing_if = "Option::is_none")]
13886    #[builder(default)]
13887    pub value: Option<Box<Color>>,
13888}
13889
13890#[derive(Debug, Clone, Serialize, Deserialize)]
13891#[serde(untagged)]
13892#[derive(From)]
13893pub enum FieldOrDatumDefWithConditionStringFieldDefStringCondition {
13894    FluffyConditionalPExprRef(FluffyConditionalPExprRef),
13895    FluffyConditionalValueDefStringExprRefArray(Vec<FluffyConditionalValueDefStringExprRef>),
13896}
13897
13898#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
13899#[builder(setter(into, strip_option))]
13900pub struct FluffyConditionalValueDefStringExprRef {
13901    /// Predicate for triggering the condition
13902    #[serde(skip_serializing_if = "Option::is_none")]
13903    #[builder(default)]
13904    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
13905    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
13906    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
13907    /// between `0` to `1` for opacity).
13908    #[serde(skip_serializing_if = "Option::is_none")]
13909    #[builder(default)]
13910    pub value: Option<Box<Color>>,
13911    /// For selection parameters, the predicate of empty selections returns true by default.
13912    /// Override this behavior, by setting this property `empty: false`.
13913    #[serde(skip_serializing_if = "Option::is_none")]
13914    #[builder(default)]
13915    pub empty: Option<bool>,
13916    /// Filter using a parameter name.
13917    #[serde(skip_serializing_if = "Option::is_none")]
13918    #[builder(default)]
13919    pub param: Option<String>,
13920}
13921
13922#[derive(Debug, Clone, Serialize, Deserialize)]
13923#[serde(rename_all = "camelCase")]
13924#[derive(Default, Builder)]
13925#[builder(setter(into, strip_option))]
13926pub struct FluffyConditionalPExprRef {
13927    /// Predicate for triggering the condition
13928    #[serde(skip_serializing_if = "Option::is_none")]
13929    #[builder(default)]
13930    pub test: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
13931    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
13932    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
13933    /// between `0` to `1` for opacity).
13934    #[serde(skip_serializing_if = "Option::is_none")]
13935    #[builder(default)]
13936    pub value: Option<Box<Color>>,
13937    /// For selection parameters, the predicate of empty selections returns true by default.
13938    /// Override this behavior, by setting this property `empty: false`.
13939    #[serde(skip_serializing_if = "Option::is_none")]
13940    #[builder(default)]
13941    pub empty: Option<bool>,
13942    /// Filter using a parameter name.
13943    #[serde(skip_serializing_if = "Option::is_none")]
13944    #[builder(default)]
13945    pub param: Option<String>,
13946    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
13947    /// `"max"`, `"count"`).
13948    ///
13949    /// __Default value:__ `undefined` (None)
13950    ///
13951    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
13952    /// documentation.
13953    #[serde(skip_serializing_if = "Option::is_none")]
13954    #[builder(default)]
13955    pub aggregate: Option<Aggregate>,
13956    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
13957    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
13958    /// middle of the band if set to `0.5`.
13959    #[serde(skip_serializing_if = "Option::is_none")]
13960    #[builder(default)]
13961    pub band_position: Option<f64>,
13962    /// A flag for binning a `quantitative` field, [an object defining binning
13963    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
13964    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
13965    /// (`"binned"`).
13966    ///
13967    /// - If `true`, default [binning
13968    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
13969    /// applied.
13970    ///
13971    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
13972    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
13973    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
13974    /// the axis ticks based on the bin step, you can also set the axis's
13975    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
13976    ///
13977    /// __Default value:__ `false`
13978    ///
13979    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
13980    #[serde(skip_serializing_if = "Option::is_none")]
13981    #[builder(default)]
13982    pub bin: Option<AngleBin>,
13983    /// __Required.__ A string defining the name of the field from which to pull a data value or
13984    /// an object defining iterated values from the
13985    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
13986    ///
13987    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
13988    ///
13989    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
13990    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
13991    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
13992    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
13993    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
13994    /// required if `aggregate` is `count`.
13995    #[serde(skip_serializing_if = "Option::is_none")]
13996    #[builder(default)]
13997    pub field: Option<Field>,
13998    /// An object defining properties of the legend. If `null`, the legend for the encoding
13999    /// channel will be removed.
14000    ///
14001    /// __Default value:__ If undefined, default [legend
14002    /// properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.
14003    ///
14004    /// __See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.
14005    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14006    #[builder(default)]
14007    pub legend: RemovableValue<Legend>,
14008    /// An object defining properties of the channel's scale, which is the function that
14009    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
14010    /// (pixels, colors, sizes) of the encoding channels.
14011    ///
14012    /// If `null`, the scale will be [disabled and the data value will be directly
14013    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
14014    ///
14015    /// __Default value:__ If undefined, default [scale
14016    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
14017    ///
14018    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
14019    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14020    #[builder(default)]
14021    pub scale: RemovableValue<Scale>,
14022    /// Sort order for the encoded field.
14023    ///
14024    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
14025    /// `"descending"`.
14026    ///
14027    /// For discrete fields, `sort` can be one of the following:
14028    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
14029    /// JavaScript.
14030    /// - [A string indicating an encoding channel name to sort
14031    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
14032    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
14033    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
14034    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
14035    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
14036    /// "descending"}`.
14037    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
14038    /// for sorting by another field.
14039    /// - [An array specifying the field values in preferred
14040    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
14041    /// sort order will obey the values in the array, followed by any unspecified values in their
14042    /// original order. For discrete time field, values in the sort array can be [date-time
14043    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
14044    /// the values can be the month or day names (case insensitive) or their 3-letter initials
14045    /// (e.g., `"Mon"`, `"Tue"`).
14046    /// - `null` indicating no sort.
14047    ///
14048    /// __Default value:__ `"ascending"`
14049    ///
14050    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
14051    ///
14052    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
14053    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14054    #[builder(default)]
14055    pub sort: RemovableValue<SortUnion>,
14056    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
14057    /// temporal field that gets casted as
14058    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
14059    ///
14060    /// __Default value:__ `undefined` (None)
14061    ///
14062    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
14063    /// documentation.
14064    #[serde(skip_serializing_if = "Option::is_none")]
14065    #[builder(default)]
14066    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
14067    /// A title for the field. If `null`, the title will be removed.
14068    ///
14069    /// __Default value:__  derived from the field's name and transformation function
14070    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
14071    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
14072    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
14073    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
14074    /// name.
14075    ///
14076    /// __Notes__:
14077    ///
14078    /// 1) You can customize the default field title format by providing the
14079    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
14080    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
14081    /// [`fieldTitle` function via the `compile` function's
14082    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
14083    ///
14084    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
14085    /// axis/header/legend title will be used.
14086    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14087    #[builder(default)]
14088    pub title: RemovableValue<LegendText>,
14089    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
14090    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
14091    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
14092    ///
14093    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
14094    /// is required for a field if: (1) the field is not nominal and the field encoding has no
14095    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
14096    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
14097    /// or `timeUnit`.
14098    ///
14099    /// __Default value:__
14100    ///
14101    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
14102    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
14103    /// following criteria:
14104    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
14105    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
14106    /// `longitude` channel or (3) if the specified scale type is [a quantitative
14107    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
14108    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
14109    /// the specified scale type is a time or utc scale
14110    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
14111    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
14112    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
14113    /// `order`.
14114    ///
14115    /// 2) For a constant value in data domain (`datum`):
14116    /// - `"quantitative"` if the datum is a number
14117    /// - `"nominal"` if the datum is a string
14118    /// - `"temporal"` if the datum is [a date time
14119    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
14120    ///
14121    /// __Note:__
14122    /// - Data `type` describes the semantics of the data rather than the primitive data types
14123    /// (number, string, etc.). The same primitive data type can have different types of
14124    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
14125    /// data.
14126    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
14127    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
14128    /// `1552199579097`).
14129    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
14130    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
14131    /// (for using an ordinal bin
14132    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
14133    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
14134    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
14135    /// [`"ordinal"` (for using an ordinal
14136    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
14137    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
14138    /// the `type` property refers to the post-aggregation data type. For example, we can
14139    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
14140    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
14141    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
14142    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
14143    ///
14144    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
14145    #[serde(rename = "type")]
14146    #[serde(skip_serializing_if = "Option::is_none")]
14147    #[builder(default)]
14148    pub conditional_p_expr_ref_type: Option<Type>,
14149    /// A constant value in data domain.
14150    #[serde(skip_serializing_if = "Option::is_none")]
14151    #[builder(default)]
14152    pub datum: Option<PrimitiveValue>,
14153}
14154
14155/// A text description of this mark for ARIA accessibility (SVG output only). For SVG output
14156/// the `"aria-label"` attribute will be set to this description.
14157///
14158/// A URL to load upon mouse click.
14159///
14160/// The URL of an image mark.
14161///
14162/// A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }
14163#[derive(Debug, Clone, Serialize, Deserialize)]
14164#[serde(rename_all = "camelCase")]
14165#[derive(Default, Builder)]
14166#[builder(setter(into, strip_option))]
14167pub struct UrlClass {
14168    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
14169    /// `"max"`, `"count"`).
14170    ///
14171    /// __Default value:__ `undefined` (None)
14172    ///
14173    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
14174    /// documentation.
14175    #[serde(skip_serializing_if = "Option::is_none")]
14176    #[builder(default)]
14177    pub aggregate: Option<Aggregate>,
14178    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
14179    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
14180    /// middle of the band if set to `0.5`.
14181    #[serde(skip_serializing_if = "Option::is_none")]
14182    #[builder(default)]
14183    pub band_position: Option<f64>,
14184    /// A flag for binning a `quantitative` field, [an object defining binning
14185    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
14186    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
14187    /// (`"binned"`).
14188    ///
14189    /// - If `true`, default [binning
14190    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
14191    /// applied.
14192    ///
14193    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
14194    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
14195    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
14196    /// the axis ticks based on the bin step, you can also set the axis's
14197    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
14198    ///
14199    /// __Default value:__ `false`
14200    ///
14201    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
14202    #[serde(skip_serializing_if = "Option::is_none")]
14203    #[builder(default)]
14204    pub bin: Option<DescriptionBin>,
14205    /// One or more value definition(s) with [a parameter or a test
14206    /// predicate](https://vega.github.io/vega-lite/docs/condition.html).
14207    ///
14208    /// __Note:__ A field definition's `condition` property can only contain [conditional value
14209    /// definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite
14210    /// only allows at most one encoded field per encoding channel.
14211    ///
14212    /// A field definition or one or more value definition(s) with a parameter predicate.
14213    #[serde(skip_serializing_if = "Option::is_none")]
14214    #[builder(default)]
14215    pub condition: Option<DescriptionCondition>,
14216    /// __Required.__ A string defining the name of the field from which to pull a data value or
14217    /// an object defining iterated values from the
14218    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
14219    ///
14220    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
14221    ///
14222    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
14223    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
14224    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
14225    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
14226    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
14227    /// required if `aggregate` is `count`.
14228    #[serde(skip_serializing_if = "Option::is_none")]
14229    #[builder(default)]
14230    pub field: Option<Field>,
14231    /// When used with the default `"number"` and `"time"` format type, the text formatting
14232    /// pattern for labels of guides (axes, legends, headers) and text marks.
14233    ///
14234    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
14235    /// format pattern](https://github.com/d3/d3-format#locale_format).
14236    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
14237    /// pattern](https://github.com/d3/d3-time-format#locale_format).
14238    ///
14239    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
14240    /// more examples.
14241    ///
14242    /// When used with a [custom
14243    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
14244    /// value will be passed as `format` alongside `datum.value` to the registered function.
14245    ///
14246    /// __Default value:__  Derived from
14247    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
14248    /// number format and from
14249    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
14250    /// format.
14251    #[serde(skip_serializing_if = "Option::is_none")]
14252    #[builder(default)]
14253    pub format: Option<Format>,
14254    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
14255    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
14256    ///
14257    /// __Default value:__
14258    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
14259    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
14260    /// `timeUnit`.
14261    #[serde(skip_serializing_if = "Option::is_none")]
14262    #[builder(default)]
14263    pub format_type: Option<String>,
14264    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
14265    /// temporal field that gets casted as
14266    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
14267    ///
14268    /// __Default value:__ `undefined` (None)
14269    ///
14270    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
14271    /// documentation.
14272    #[serde(skip_serializing_if = "Option::is_none")]
14273    #[builder(default)]
14274    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
14275    /// A title for the field. If `null`, the title will be removed.
14276    ///
14277    /// __Default value:__  derived from the field's name and transformation function
14278    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
14279    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
14280    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
14281    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
14282    /// name.
14283    ///
14284    /// __Notes__:
14285    ///
14286    /// 1) You can customize the default field title format by providing the
14287    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
14288    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
14289    /// [`fieldTitle` function via the `compile` function's
14290    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
14291    ///
14292    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
14293    /// axis/header/legend title will be used.
14294    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14295    #[builder(default)]
14296    pub title: RemovableValue<LegendText>,
14297    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
14298    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
14299    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
14300    ///
14301    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
14302    /// is required for a field if: (1) the field is not nominal and the field encoding has no
14303    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
14304    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
14305    /// or `timeUnit`.
14306    ///
14307    /// __Default value:__
14308    ///
14309    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
14310    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
14311    /// following criteria:
14312    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
14313    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
14314    /// `longitude` channel or (3) if the specified scale type is [a quantitative
14315    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
14316    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
14317    /// the specified scale type is a time or utc scale
14318    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
14319    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
14320    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
14321    /// `order`.
14322    ///
14323    /// 2) For a constant value in data domain (`datum`):
14324    /// - `"quantitative"` if the datum is a number
14325    /// - `"nominal"` if the datum is a string
14326    /// - `"temporal"` if the datum is [a date time
14327    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
14328    ///
14329    /// __Note:__
14330    /// - Data `type` describes the semantics of the data rather than the primitive data types
14331    /// (number, string, etc.). The same primitive data type can have different types of
14332    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
14333    /// data.
14334    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
14335    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
14336    /// `1552199579097`).
14337    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
14338    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
14339    /// (for using an ordinal bin
14340    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
14341    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
14342    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
14343    /// [`"ordinal"` (for using an ordinal
14344    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
14345    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
14346    /// the `type` property refers to the post-aggregation data type. For example, we can
14347    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
14348    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
14349    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
14350    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
14351    ///
14352    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
14353    #[serde(rename = "type")]
14354    #[serde(skip_serializing_if = "Option::is_none")]
14355    #[builder(default)]
14356    pub field_or_datum_def_with_condition_string_field_def_string_type: Option<StandardType>,
14357    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
14358    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
14359    /// between `0` to `1` for opacity).
14360    #[serde(skip_serializing_if = "Option::is_none")]
14361    #[builder(default)]
14362    pub value: Option<Box<Color>>,
14363}
14364
14365/// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
14366/// `x2` or `width`.
14367///
14368/// The `value` of this channel can be a number or a string `"width"` for the width of the
14369/// plot.
14370///
14371/// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
14372/// `y2` or `height`.
14373///
14374/// The `value` of this channel can be a number or a string `"height"` for the height of the
14375/// plot.
14376///
14377/// Definition object for a constant value (primitive value or gradient definition) of an
14378/// encoding channel.
14379#[derive(Debug, Clone, Serialize, Deserialize)]
14380#[serde(rename_all = "camelCase")]
14381#[derive(Default, Builder)]
14382#[builder(setter(into, strip_option))]
14383pub struct XClass {
14384    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
14385    /// `"max"`, `"count"`).
14386    ///
14387    /// __Default value:__ `undefined` (None)
14388    ///
14389    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
14390    /// documentation.
14391    #[serde(skip_serializing_if = "Option::is_none")]
14392    #[builder(default)]
14393    pub aggregate: Option<Aggregate>,
14394    /// An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis
14395    /// for the encoding channel will be removed.
14396    ///
14397    /// __Default value:__ If undefined, default [axis
14398    /// properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.
14399    ///
14400    /// __See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation.
14401    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14402    #[builder(default)]
14403    pub axis: RemovableValue<Axis>,
14404    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
14405    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
14406    /// middle of the band if set to `0.5`.
14407    #[serde(skip_serializing_if = "Option::is_none")]
14408    #[builder(default)]
14409    pub band_position: Option<f64>,
14410    /// A flag for binning a `quantitative` field, [an object defining binning
14411    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
14412    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
14413    /// (`"binned"`).
14414    ///
14415    /// - If `true`, default [binning
14416    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
14417    /// applied.
14418    ///
14419    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
14420    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
14421    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
14422    /// the axis ticks based on the bin step, you can also set the axis's
14423    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
14424    ///
14425    /// __Default value:__ `false`
14426    ///
14427    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
14428    #[serde(skip_serializing_if = "Option::is_none")]
14429    #[builder(default)]
14430    pub bin: Option<DescriptionBin>,
14431    /// __Required.__ A string defining the name of the field from which to pull a data value or
14432    /// an object defining iterated values from the
14433    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
14434    ///
14435    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
14436    ///
14437    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
14438    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
14439    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
14440    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
14441    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
14442    /// required if `aggregate` is `count`.
14443    #[serde(skip_serializing_if = "Option::is_none")]
14444    #[builder(default)]
14445    pub field: Option<Field>,
14446    /// An object defining the properties of the Impute Operation to be applied. The field value
14447    /// of the other positional channel is taken as `key` of the `Impute` Operation. The field of
14448    /// the `color` channel if specified is used as `groupby` of the `Impute` Operation.
14449    ///
14450    /// __See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation.
14451    #[serde(skip_serializing_if = "Option::is_none")]
14452    #[builder(default)]
14453    pub impute: Option<ImputeParams>,
14454    /// An object defining properties of the channel's scale, which is the function that
14455    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
14456    /// (pixels, colors, sizes) of the encoding channels.
14457    ///
14458    /// If `null`, the scale will be [disabled and the data value will be directly
14459    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
14460    ///
14461    /// __Default value:__ If undefined, default [scale
14462    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
14463    ///
14464    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
14465    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14466    #[builder(default)]
14467    pub scale: RemovableValue<Scale>,
14468    /// Sort order for the encoded field.
14469    ///
14470    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
14471    /// `"descending"`.
14472    ///
14473    /// For discrete fields, `sort` can be one of the following:
14474    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
14475    /// JavaScript.
14476    /// - [A string indicating an encoding channel name to sort
14477    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
14478    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
14479    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
14480    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
14481    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
14482    /// "descending"}`.
14483    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
14484    /// for sorting by another field.
14485    /// - [An array specifying the field values in preferred
14486    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
14487    /// sort order will obey the values in the array, followed by any unspecified values in their
14488    /// original order. For discrete time field, values in the sort array can be [date-time
14489    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
14490    /// the values can be the month or day names (case insensitive) or their 3-letter initials
14491    /// (e.g., `"Mon"`, `"Tue"`).
14492    /// - `null` indicating no sort.
14493    ///
14494    /// __Default value:__ `"ascending"`
14495    ///
14496    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
14497    ///
14498    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
14499    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14500    #[builder(default)]
14501    pub sort: RemovableValue<SortUnion>,
14502    /// Type of stacking offset if the field should be stacked. `stack` is only applicable for
14503    /// `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of
14504    /// `y` can be used to customize stacking for a vertical bar chart.
14505    ///
14506    /// `stack` can be one of the following values:
14507    /// - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for
14508    /// creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and
14509    /// [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).
14510    /// - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar
14511    /// and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie
14512    /// charts [with percentage
14513    /// tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>
14514    /// -`"center"` - stacking with center baseline (for
14515    /// [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).
14516    /// - `null` or `false` - No-stacking. This will produce layered
14517    /// [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area
14518    /// chart.
14519    ///
14520    /// __Default value:__ `zero` for plots with all of the following conditions are true: (1)
14521    /// the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a
14522    /// linear scale; (3) At least one of non-position channels mapped to an unaggregated field
14523    /// that is different from x and y. Otherwise, `null` by default.
14524    ///
14525    /// __See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.
14526    #[serde(skip_serializing_if = "Option::is_none")]
14527    #[builder(default)]
14528    pub stack: Option<Stack>,
14529    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
14530    /// temporal field that gets casted as
14531    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
14532    ///
14533    /// __Default value:__ `undefined` (None)
14534    ///
14535    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
14536    /// documentation.
14537    #[serde(skip_serializing_if = "Option::is_none")]
14538    #[builder(default)]
14539    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
14540    /// A title for the field. If `null`, the title will be removed.
14541    ///
14542    /// __Default value:__  derived from the field's name and transformation function
14543    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
14544    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
14545    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
14546    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
14547    /// name.
14548    ///
14549    /// __Notes__:
14550    ///
14551    /// 1) You can customize the default field title format by providing the
14552    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
14553    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
14554    /// [`fieldTitle` function via the `compile` function's
14555    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
14556    ///
14557    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
14558    /// axis/header/legend title will be used.
14559    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14560    #[builder(default)]
14561    pub title: RemovableValue<LegendText>,
14562    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
14563    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
14564    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
14565    ///
14566    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
14567    /// is required for a field if: (1) the field is not nominal and the field encoding has no
14568    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
14569    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
14570    /// or `timeUnit`.
14571    ///
14572    /// __Default value:__
14573    ///
14574    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
14575    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
14576    /// following criteria:
14577    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
14578    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
14579    /// `longitude` channel or (3) if the specified scale type is [a quantitative
14580    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
14581    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
14582    /// the specified scale type is a time or utc scale
14583    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
14584    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
14585    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
14586    /// `order`.
14587    ///
14588    /// 2) For a constant value in data domain (`datum`):
14589    /// - `"quantitative"` if the datum is a number
14590    /// - `"nominal"` if the datum is a string
14591    /// - `"temporal"` if the datum is [a date time
14592    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
14593    ///
14594    /// __Note:__
14595    /// - Data `type` describes the semantics of the data rather than the primitive data types
14596    /// (number, string, etc.). The same primitive data type can have different types of
14597    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
14598    /// data.
14599    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
14600    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
14601    /// `1552199579097`).
14602    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
14603    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
14604    /// (for using an ordinal bin
14605    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
14606    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
14607    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
14608    /// [`"ordinal"` (for using an ordinal
14609    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
14610    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
14611    /// the `type` property refers to the post-aggregation data type. For example, we can
14612    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
14613    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
14614    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
14615    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
14616    ///
14617    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
14618    #[serde(rename = "type")]
14619    #[serde(skip_serializing_if = "Option::is_none")]
14620    #[builder(default)]
14621    pub position_def_type: Option<Type>,
14622    /// A constant value in data domain.
14623    #[serde(skip_serializing_if = "Option::is_none")]
14624    #[builder(default)]
14625    pub datum: Option<PrimitiveValue>,
14626    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
14627    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
14628    /// between `0` to `1` for opacity).
14629    #[serde(skip_serializing_if = "Option::is_none")]
14630    #[builder(default)]
14631    pub value: Option<Latitude2Value>,
14632}
14633
14634#[derive(Debug, Clone, Serialize, Deserialize)]
14635#[serde(rename_all = "camelCase")]
14636#[derive(Default, Builder)]
14637#[builder(setter(into, strip_option))]
14638pub struct Axis {
14639    #[serde(skip_serializing_if = "Option::is_none")]
14640    #[builder(default)]
14641    pub aria: Option<Aria>,
14642    #[serde(skip_serializing_if = "Option::is_none")]
14643    #[builder(default)]
14644    pub band_position: Option<CornerRadiusUnion>,
14645    #[serde(skip_serializing_if = "Option::is_none")]
14646    #[builder(default)]
14647    pub description: Option<Box<Color>>,
14648    /// A boolean flag indicating if the domain (the axis baseline) should be included as part of
14649    /// the axis.
14650    ///
14651    /// __Default value:__ `true`
14652    #[serde(skip_serializing_if = "Option::is_none")]
14653    #[builder(default)]
14654    pub domain: Option<bool>,
14655    #[serde(skip_serializing_if = "Option::is_none")]
14656    #[builder(default)]
14657    pub domain_cap: Option<Cap>,
14658    #[serde(skip_serializing_if = "Option::is_none")]
14659    #[builder(default)]
14660    pub domain_color: Option<Box<Color>>,
14661    #[serde(skip_serializing_if = "Option::is_none")]
14662    #[builder(default)]
14663    pub domain_dash: Option<StrokeDashUnion>,
14664    #[serde(skip_serializing_if = "Option::is_none")]
14665    #[builder(default)]
14666    pub domain_dash_offset: Option<CornerRadiusUnion>,
14667    #[serde(skip_serializing_if = "Option::is_none")]
14668    #[builder(default)]
14669    pub domain_opacity: Option<CornerRadiusUnion>,
14670    #[serde(skip_serializing_if = "Option::is_none")]
14671    #[builder(default)]
14672    pub domain_width: Option<CornerRadiusUnion>,
14673    /// When used with the default `"number"` and `"time"` format type, the text formatting
14674    /// pattern for labels of guides (axes, legends, headers) and text marks.
14675    ///
14676    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
14677    /// format pattern](https://github.com/d3/d3-format#locale_format).
14678    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
14679    /// pattern](https://github.com/d3/d3-time-format#locale_format).
14680    ///
14681    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
14682    /// more examples.
14683    ///
14684    /// When used with a [custom
14685    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
14686    /// value will be passed as `format` alongside `datum.value` to the registered function.
14687    ///
14688    /// __Default value:__  Derived from
14689    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
14690    /// number format and from
14691    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
14692    /// format.
14693    #[serde(skip_serializing_if = "Option::is_none")]
14694    #[builder(default)]
14695    pub format: Option<Format>,
14696    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
14697    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
14698    ///
14699    /// __Default value:__
14700    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
14701    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
14702    /// `timeUnit`.
14703    #[serde(skip_serializing_if = "Option::is_none")]
14704    #[builder(default)]
14705    pub format_type: Option<String>,
14706    /// A boolean flag indicating if grid lines should be included as part of the axis
14707    ///
14708    /// __Default value:__ `true` for [continuous
14709    /// scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned;
14710    /// otherwise, `false`.
14711    #[serde(skip_serializing_if = "Option::is_none")]
14712    #[builder(default)]
14713    pub grid: Option<bool>,
14714    #[serde(skip_serializing_if = "Option::is_none")]
14715    #[builder(default)]
14716    pub grid_cap: Option<Cap>,
14717    #[serde(skip_serializing_if = "Option::is_none")]
14718    #[builder(default)]
14719    pub grid_color: Option<GridColorUnion>,
14720    #[serde(skip_serializing_if = "Option::is_none")]
14721    #[builder(default)]
14722    pub grid_dash: Option<AxisGridDash>,
14723    #[serde(skip_serializing_if = "Option::is_none")]
14724    #[builder(default)]
14725    pub grid_dash_offset: Option<GridDashOffsetUnion>,
14726    #[serde(skip_serializing_if = "Option::is_none")]
14727    #[builder(default)]
14728    pub grid_opacity: Option<GridOpacityUnion>,
14729    #[serde(skip_serializing_if = "Option::is_none")]
14730    #[builder(default)]
14731    pub grid_width: Option<GridWidthUnion>,
14732    #[serde(skip_serializing_if = "Option::is_none")]
14733    #[builder(default)]
14734    pub label_align: Option<ConditionalAxisPropertyAlignNull>,
14735    #[serde(skip_serializing_if = "Option::is_none")]
14736    #[builder(default)]
14737    pub label_angle: Option<LabelAngle>,
14738    #[serde(skip_serializing_if = "Option::is_none")]
14739    #[builder(default)]
14740    pub label_baseline: Option<PurpleTextBaseline>,
14741    #[serde(skip_serializing_if = "Option::is_none")]
14742    #[builder(default)]
14743    pub label_bound: Option<Label>,
14744    #[serde(skip_serializing_if = "Option::is_none")]
14745    #[builder(default)]
14746    pub label_color: Option<GridColorUnion>,
14747    /// [Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.
14748    ///
14749    /// __Note:__ The label text and value can be assessed via the `label` and `value` properties
14750    /// of the axis's backing `datum` object.
14751    #[serde(skip_serializing_if = "Option::is_none")]
14752    #[builder(default)]
14753    pub label_expr: Option<String>,
14754    /// Indicates if the first and last axis labels should be aligned flush with the scale range.
14755    /// Flush alignment for a horizontal axis will left-align the first label and right-align the
14756    /// last label. For vertical axes, bottom and top text baselines are applied instead. If this
14757    /// property is a number, it also indicates the number of pixels by which to offset the first
14758    /// and last labels; for example, a value of 2 will flush-align the first and last labels and
14759    /// also push them 2 pixels outward from the center of the axis. The additional adjustment
14760    /// can sometimes help the labels better visually group with corresponding axis ticks.
14761    ///
14762    /// __Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.
14763    #[serde(skip_serializing_if = "Option::is_none")]
14764    #[builder(default)]
14765    pub label_flush: Option<LabelFlush>,
14766    #[serde(skip_serializing_if = "Option::is_none")]
14767    #[builder(default)]
14768    pub label_flush_offset: Option<CornerRadiusUnion>,
14769    #[serde(skip_serializing_if = "Option::is_none")]
14770    #[builder(default)]
14771    pub label_font: Option<ConditionalAxisPropertyStringNull>,
14772    #[serde(skip_serializing_if = "Option::is_none")]
14773    #[builder(default)]
14774    pub label_font_size: Option<GridWidthUnion>,
14775    #[serde(skip_serializing_if = "Option::is_none")]
14776    #[builder(default)]
14777    pub label_font_style: Option<ConditionalAxisPropertyFontStyleNull>,
14778    #[serde(skip_serializing_if = "Option::is_none")]
14779    #[builder(default)]
14780    pub label_font_weight: Option<FontWeight>,
14781    #[serde(skip_serializing_if = "Option::is_none")]
14782    #[builder(default)]
14783    pub label_limit: Option<CornerRadiusUnion>,
14784    #[serde(skip_serializing_if = "Option::is_none")]
14785    #[builder(default)]
14786    pub label_line_height: Option<CornerRadiusUnion>,
14787    #[serde(skip_serializing_if = "Option::is_none")]
14788    #[builder(default)]
14789    pub label_offset: Option<GridDashOffsetUnion>,
14790    #[serde(skip_serializing_if = "Option::is_none")]
14791    #[builder(default)]
14792    pub label_opacity: Option<GridDashOffsetUnion>,
14793    /// The strategy to use for resolving overlap of axis labels. If `false` (the default), no
14794    /// overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
14795    /// every other label is used (this works well for standard linear axes). If set to
14796    /// `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps
14797    /// with the last visible label (this often works better for log-scaled axes).
14798    ///
14799    /// __Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log
14800    /// scales; otherwise `false`.
14801    #[serde(skip_serializing_if = "Option::is_none")]
14802    #[builder(default)]
14803    pub label_overlap: Option<LabelOverlapUnion>,
14804    #[serde(skip_serializing_if = "Option::is_none")]
14805    #[builder(default)]
14806    pub label_padding: Option<GridDashOffsetUnion>,
14807    /// A boolean flag indicating if labels should be included as part of the axis.
14808    ///
14809    /// __Default value:__ `true`.
14810    #[serde(skip_serializing_if = "Option::is_none")]
14811    #[builder(default)]
14812    pub labels: Option<bool>,
14813    #[serde(skip_serializing_if = "Option::is_none")]
14814    #[builder(default)]
14815    pub label_separation: Option<CornerRadiusUnion>,
14816    #[serde(skip_serializing_if = "Option::is_none")]
14817    #[builder(default)]
14818    pub max_extent: Option<CornerRadiusUnion>,
14819    #[serde(skip_serializing_if = "Option::is_none")]
14820    #[builder(default)]
14821    pub min_extent: Option<CornerRadiusUnion>,
14822    /// The offset, in pixels, by which to displace the axis from the edge of the enclosing group
14823    /// or data rectangle.
14824    ///
14825    /// __Default value:__ derived from the [axis
14826    /// config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset`
14827    /// (`0` by default)
14828    #[serde(skip_serializing_if = "Option::is_none")]
14829    #[builder(default)]
14830    pub offset: Option<CornerRadiusUnion>,
14831    /// The orientation of the axis. One of `"top"`, `"bottom"`, `"left"` or `"right"`. The
14832    /// orientation can be used to further specialize the axis type (e.g., a y-axis oriented
14833    /// towards the right edge of the chart).
14834    ///
14835    /// __Default value:__ `"bottom"` for x-axes and `"left"` for y-axes.
14836    #[serde(skip_serializing_if = "Option::is_none")]
14837    #[builder(default)]
14838    pub orient: Option<TitleOrientUnion>,
14839    /// The anchor position of the axis in pixels. For x-axes with top or bottom orientation,
14840    /// this sets the axis group x coordinate. For y-axes with left or right orientation, this
14841    /// sets the axis group y coordinate.
14842    ///
14843    /// __Default value__: `0`
14844    #[serde(skip_serializing_if = "Option::is_none")]
14845    #[builder(default)]
14846    pub position: Option<CornerRadiusUnion>,
14847    /// A string or array of strings indicating the name of custom styles to apply to the axis. A
14848    /// style is a named collection of axis property defined within the [style
14849    /// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
14850    /// an array, later styles will override earlier styles.
14851    ///
14852    /// __Default value:__ (none) __Note:__ Any specified style will augment the default style.
14853    /// For example, an x-axis mark with `"style": "foo"` will use `config.axisX` and
14854    /// `config.style.foo` (the specified style `"foo"` has higher precedence).
14855    #[serde(skip_serializing_if = "Option::is_none")]
14856    #[builder(default)]
14857    pub style: Option<LegendText>,
14858    #[serde(skip_serializing_if = "Option::is_none")]
14859    #[builder(default)]
14860    pub tick_band: Option<TickBandUnion>,
14861    #[serde(skip_serializing_if = "Option::is_none")]
14862    #[builder(default)]
14863    pub tick_cap: Option<Cap>,
14864    #[serde(skip_serializing_if = "Option::is_none")]
14865    #[builder(default)]
14866    pub tick_color: Option<GridColorUnion>,
14867    /// A desired number of ticks, for axes visualizing quantitative scales. The resulting number
14868    /// may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the
14869    /// underlying scale's range.
14870    ///
14871    /// For scales of type `"time"` or `"utc"`, the tick count can instead be a time interval
14872    /// specifier. Legal string values are `"millisecond"`, `"second"`, `"minute"`, `"hour"`,
14873    /// `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, an object-valued interval
14874    /// specifier of the form `{"interval": "month", "step": 3}` includes a desired number of
14875    /// interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct)
14876    /// boundary.
14877    ///
14878    /// __Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)`
14879    /// for y.
14880    #[serde(skip_serializing_if = "Option::is_none")]
14881    #[builder(default)]
14882    pub tick_count: Option<TickCount>,
14883    #[serde(skip_serializing_if = "Option::is_none")]
14884    #[builder(default)]
14885    pub tick_dash: Option<AxisTickDash>,
14886    #[serde(skip_serializing_if = "Option::is_none")]
14887    #[builder(default)]
14888    pub tick_dash_offset: Option<GridDashOffsetUnion>,
14889    /// Boolean flag indicating if an extra axis tick should be added for the initial position of
14890    /// the axis. This flag is useful for styling axes for `band` scales such that ticks are
14891    /// placed on band boundaries rather in the middle of a band. Use in conjunction with
14892    /// `"bandPosition": 1` and an axis `"padding"` value of `0`.
14893    #[serde(skip_serializing_if = "Option::is_none")]
14894    #[builder(default)]
14895    pub tick_extra: Option<bool>,
14896    /// The minimum desired step between axis ticks, in terms of scale domain values. For
14897    /// example, a value of `1` indicates that ticks should not be less than 1 unit apart. If
14898    /// `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to
14899    /// enforce the minimum step value.
14900    #[serde(skip_serializing_if = "Option::is_none")]
14901    #[builder(default)]
14902    pub tick_min_step: Option<CornerRadiusUnion>,
14903    #[serde(skip_serializing_if = "Option::is_none")]
14904    #[builder(default)]
14905    pub tick_offset: Option<CornerRadiusUnion>,
14906    #[serde(skip_serializing_if = "Option::is_none")]
14907    #[builder(default)]
14908    pub tick_opacity: Option<GridDashOffsetUnion>,
14909    /// Boolean flag indicating if pixel position values should be rounded to the nearest
14910    /// integer.
14911    ///
14912    /// __Default value:__ `true`
14913    #[serde(skip_serializing_if = "Option::is_none")]
14914    #[builder(default)]
14915    pub tick_round: Option<bool>,
14916    /// Boolean value that determines whether the axis should include ticks.
14917    ///
14918    /// __Default value:__ `true`
14919    #[serde(skip_serializing_if = "Option::is_none")]
14920    #[builder(default)]
14921    pub ticks: Option<bool>,
14922    #[serde(skip_serializing_if = "Option::is_none")]
14923    #[builder(default)]
14924    pub tick_size: Option<GridWidthUnion>,
14925    #[serde(skip_serializing_if = "Option::is_none")]
14926    #[builder(default)]
14927    pub tick_width: Option<GridWidthUnion>,
14928    /// A title for the field. If `null`, the title will be removed.
14929    ///
14930    /// __Default value:__  derived from the field's name and transformation function
14931    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
14932    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
14933    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
14934    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
14935    /// name.
14936    ///
14937    /// __Notes__:
14938    ///
14939    /// 1) You can customize the default field title format by providing the
14940    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
14941    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
14942    /// [`fieldTitle` function via the `compile` function's
14943    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
14944    ///
14945    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
14946    /// axis/header/legend title will be used.
14947    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
14948    #[builder(default)]
14949    pub title: RemovableValue<LegendText>,
14950    #[serde(skip_serializing_if = "Option::is_none")]
14951    #[builder(default)]
14952    pub title_align: Option<TitleAlignUnion>,
14953    #[serde(skip_serializing_if = "Option::is_none")]
14954    #[builder(default)]
14955    pub title_anchor: Option<TitleAnchorUnion>,
14956    #[serde(skip_serializing_if = "Option::is_none")]
14957    #[builder(default)]
14958    pub title_angle: Option<CornerRadiusUnion>,
14959    #[serde(skip_serializing_if = "Option::is_none")]
14960    #[builder(default)]
14961    pub title_baseline: Option<TextBaseline>,
14962    #[serde(skip_serializing_if = "Option::is_none")]
14963    #[builder(default)]
14964    pub title_color: Option<Box<Color>>,
14965    #[serde(skip_serializing_if = "Option::is_none")]
14966    #[builder(default)]
14967    pub title_font: Option<Box<Color>>,
14968    #[serde(skip_serializing_if = "Option::is_none")]
14969    #[builder(default)]
14970    pub title_font_size: Option<FontSize>,
14971    #[serde(skip_serializing_if = "Option::is_none")]
14972    #[builder(default)]
14973    pub title_font_style: Option<Box<Color>>,
14974    #[serde(skip_serializing_if = "Option::is_none")]
14975    #[builder(default)]
14976    pub title_font_weight: Option<FontWeightUnion>,
14977    #[serde(skip_serializing_if = "Option::is_none")]
14978    #[builder(default)]
14979    pub title_limit: Option<FontSize>,
14980    #[serde(skip_serializing_if = "Option::is_none")]
14981    #[builder(default)]
14982    pub title_line_height: Option<CornerRadiusUnion>,
14983    #[serde(skip_serializing_if = "Option::is_none")]
14984    #[builder(default)]
14985    pub title_opacity: Option<CornerRadiusUnion>,
14986    #[serde(skip_serializing_if = "Option::is_none")]
14987    #[builder(default)]
14988    pub title_padding: Option<CornerRadiusUnion>,
14989    #[serde(skip_serializing_if = "Option::is_none")]
14990    #[builder(default)]
14991    pub title_x: Option<CornerRadiusUnion>,
14992    #[serde(skip_serializing_if = "Option::is_none")]
14993    #[builder(default)]
14994    pub title_y: Option<CornerRadiusUnion>,
14995    #[serde(skip_serializing_if = "Option::is_none")]
14996    #[builder(default)]
14997    pub translate: Option<CornerRadiusUnion>,
14998    /// Explicitly set the visible axis tick values.
14999    #[serde(skip_serializing_if = "Option::is_none")]
15000    #[builder(default)]
15001    pub values: Option<Values>,
15002    /// A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be
15003    /// drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.
15004    ///
15005    /// __Default value:__ `0` (behind the marks).
15006    #[serde(skip_serializing_if = "Option::is_none")]
15007    #[builder(default)]
15008    pub zindex: Option<f64>,
15009}
15010
15011#[derive(Debug, Clone, Serialize, Deserialize)]
15012#[serde(untagged)]
15013#[derive(From)]
15014pub enum Cap {
15015    BackgroundExprRef(BackgroundExprRef),
15016    Enum(StrokeCap),
15017}
15018
15019/// The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.
15020///
15021/// __Default value:__ `"butt"`
15022///
15023/// The stroke cap for the domain line's ending style. One of `"butt"`, `"round"` or
15024/// `"square"`.
15025///
15026/// __Default value:__ `"butt"`
15027///
15028/// The stroke cap for grid lines' ending style. One of `"butt"`, `"round"` or `"square"`.
15029///
15030/// __Default value:__ `"butt"`
15031///
15032/// The stroke cap for the tick lines' ending style. One of `"butt"`, `"round"` or
15033/// `"square"`.
15034///
15035/// __Default value:__ `"butt"`
15036#[derive(Debug, Clone, Serialize, Deserialize)]
15037#[serde(rename_all = "snake_case")]
15038pub enum StrokeCap {
15039    Butt,
15040    Round,
15041    Square,
15042}
15043
15044#[derive(Debug, Clone, Serialize, Deserialize)]
15045#[serde(untagged)]
15046#[derive(From)]
15047pub enum GridColorUnion {
15048    GridColorExprRef(GridColorExprRef),
15049    String(String),
15050}
15051
15052/// An expression for an array of raw values that, if non-null, directly overrides the
15053/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15054/// a scale. The scale may be initially determined using a data-driven domain, then modified
15055/// in response to user input by setting the rawDomain value.
15056#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15057#[builder(setter(into, strip_option))]
15058pub struct GridColorExprRef {
15059    /// Vega expression (which can refer to Vega-Lite parameters).
15060    #[serde(skip_serializing_if = "Option::is_none")]
15061    #[builder(default)]
15062    pub expr: Option<String>,
15063    #[serde(skip_serializing_if = "Option::is_none")]
15064    #[builder(default)]
15065    pub condition: Option<ConditionUnion>,
15066    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15067    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15068    /// between `0` to `1` for opacity).
15069    #[serde(skip_serializing_if = "Option::is_none")]
15070    #[builder(default)]
15071    pub value: Option<String>,
15072}
15073
15074#[derive(Debug, Clone, Serialize, Deserialize)]
15075#[serde(untagged)]
15076#[derive(From)]
15077pub enum ConditionUnion {
15078    ConditionClass(ConditionClass),
15079    ConditionalPredicateValueDefColorNullExprRefArray(
15080        Vec<ConditionalPredicateValueDefColorNullExprRef>,
15081    ),
15082}
15083
15084#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15085#[builder(setter(into, strip_option))]
15086pub struct ConditionalPredicateValueDefColorNullExprRef {
15087    /// Predicate for triggering the condition
15088    #[serde(skip_serializing_if = "Option::is_none")]
15089    #[builder(default)]
15090    pub test: Option<PredicateCompositionElement>,
15091    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15092    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15093    /// between `0` to `1` for opacity).
15094    #[serde(skip_serializing_if = "Option::is_none")]
15095    #[builder(default)]
15096    pub value: Option<String>,
15097    /// Vega expression (which can refer to Vega-Lite parameters).
15098    #[serde(skip_serializing_if = "Option::is_none")]
15099    #[builder(default)]
15100    pub expr: Option<String>,
15101}
15102
15103#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15104#[builder(setter(into, strip_option))]
15105pub struct ConditionClass {
15106    /// Predicate for triggering the condition
15107    #[serde(skip_serializing_if = "Option::is_none")]
15108    #[builder(default)]
15109    pub test: Option<PredicateCompositionElement>,
15110    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15111    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15112    /// between `0` to `1` for opacity).
15113    #[serde(skip_serializing_if = "Option::is_none")]
15114    #[builder(default)]
15115    pub value: Option<String>,
15116    /// Vega expression (which can refer to Vega-Lite parameters).
15117    #[serde(skip_serializing_if = "Option::is_none")]
15118    #[builder(default)]
15119    pub expr: Option<String>,
15120}
15121
15122#[derive(Debug, Clone, Serialize, Deserialize)]
15123#[serde(untagged)]
15124#[derive(From)]
15125pub enum AxisGridDash {
15126    DoubleArray(Vec<f64>),
15127    PurpleExprRef(PurpleExprRef),
15128}
15129
15130/// An expression for an array of raw values that, if non-null, directly overrides the
15131/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15132/// a scale. The scale may be initially determined using a data-driven domain, then modified
15133/// in response to user input by setting the rawDomain value.
15134#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15135#[builder(setter(into, strip_option))]
15136pub struct PurpleExprRef {
15137    /// Vega expression (which can refer to Vega-Lite parameters).
15138    #[serde(skip_serializing_if = "Option::is_none")]
15139    #[builder(default)]
15140    pub expr: Option<String>,
15141    #[serde(skip_serializing_if = "Option::is_none")]
15142    #[builder(default)]
15143    pub condition: Option<TentacledConditionalPredicateValueDefNumberNullExprRef>,
15144    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15145    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15146    /// between `0` to `1` for opacity).
15147    #[serde(skip_serializing_if = "Option::is_none")]
15148    #[builder(default)]
15149    pub value: Option<Vec<f64>>,
15150}
15151
15152#[derive(Debug, Clone, Serialize, Deserialize)]
15153#[serde(untagged)]
15154#[derive(From)]
15155pub enum TentacledConditionalPredicateValueDefNumberNullExprRef {
15156    ConditionalPredicateValueDefNumberNullExprRefArray(
15157        Vec<ConditionalPredicateValueDefNumberNullExprRef>,
15158    ),
15159    PurpleConditionalPredicateValueDefNumberNullExprRef(
15160        PurpleConditionalPredicateValueDefNumberNullExprRef,
15161    ),
15162}
15163
15164#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15165#[builder(setter(into, strip_option))]
15166pub struct ConditionalPredicateValueDefNumberNullExprRef {
15167    /// Predicate for triggering the condition
15168    #[serde(skip_serializing_if = "Option::is_none")]
15169    #[builder(default)]
15170    pub test: Option<PredicateCompositionElement>,
15171    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15172    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15173    /// between `0` to `1` for opacity).
15174    #[serde(skip_serializing_if = "Option::is_none")]
15175    #[builder(default)]
15176    pub value: Option<Vec<f64>>,
15177    /// Vega expression (which can refer to Vega-Lite parameters).
15178    #[serde(skip_serializing_if = "Option::is_none")]
15179    #[builder(default)]
15180    pub expr: Option<String>,
15181}
15182
15183#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15184#[builder(setter(into, strip_option))]
15185pub struct PurpleConditionalPredicateValueDefNumberNullExprRef {
15186    /// Predicate for triggering the condition
15187    #[serde(skip_serializing_if = "Option::is_none")]
15188    #[builder(default)]
15189    pub test: Option<PredicateCompositionElement>,
15190    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15191    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15192    /// between `0` to `1` for opacity).
15193    #[serde(skip_serializing_if = "Option::is_none")]
15194    #[builder(default)]
15195    pub value: Option<Vec<f64>>,
15196    /// Vega expression (which can refer to Vega-Lite parameters).
15197    #[serde(skip_serializing_if = "Option::is_none")]
15198    #[builder(default)]
15199    pub expr: Option<String>,
15200}
15201
15202#[derive(Debug, Clone, Serialize, Deserialize)]
15203#[serde(untagged)]
15204#[derive(From)]
15205pub enum GridDashOffsetUnion {
15206    Double(f64),
15207    GridDashOffsetExprRef(GridDashOffsetExprRef),
15208}
15209
15210/// An expression for an array of raw values that, if non-null, directly overrides the
15211/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15212/// a scale. The scale may be initially determined using a data-driven domain, then modified
15213/// in response to user input by setting the rawDomain value.
15214#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15215#[builder(setter(into, strip_option))]
15216pub struct GridDashOffsetExprRef {
15217    /// Vega expression (which can refer to Vega-Lite parameters).
15218    #[serde(skip_serializing_if = "Option::is_none")]
15219    #[builder(default)]
15220    pub expr: Option<String>,
15221    #[serde(skip_serializing_if = "Option::is_none")]
15222    #[builder(default)]
15223    pub condition: Option<StickyConditionalPredicateValueDefNumberNullExprRef>,
15224    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15225    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15226    /// between `0` to `1` for opacity).
15227    #[serde(skip_serializing_if = "Option::is_none")]
15228    #[builder(default)]
15229    pub value: Option<f64>,
15230}
15231
15232#[derive(Debug, Clone, Serialize, Deserialize)]
15233#[serde(untagged)]
15234#[derive(From)]
15235pub enum StickyConditionalPredicateValueDefNumberNullExprRef {
15236    ConditionalPredicateValueDefNumberNullExprRefElementArray(
15237        Vec<ConditionalPredicateValueDefNumberNullExprRefElement>,
15238    ),
15239    FluffyConditionalPredicateValueDefNumberNullExprRef(
15240        FluffyConditionalPredicateValueDefNumberNullExprRef,
15241    ),
15242}
15243
15244#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15245#[builder(setter(into, strip_option))]
15246pub struct ConditionalPredicateValueDefNumberNullExprRefElement {
15247    /// Predicate for triggering the condition
15248    #[serde(skip_serializing_if = "Option::is_none")]
15249    #[builder(default)]
15250    pub test: Option<PredicateCompositionElement>,
15251    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15252    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15253    /// between `0` to `1` for opacity).
15254    #[serde(skip_serializing_if = "Option::is_none")]
15255    #[builder(default)]
15256    pub value: Option<f64>,
15257    /// Vega expression (which can refer to Vega-Lite parameters).
15258    #[serde(skip_serializing_if = "Option::is_none")]
15259    #[builder(default)]
15260    pub expr: Option<String>,
15261}
15262
15263#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15264#[builder(setter(into, strip_option))]
15265pub struct FluffyConditionalPredicateValueDefNumberNullExprRef {
15266    /// Predicate for triggering the condition
15267    #[serde(skip_serializing_if = "Option::is_none")]
15268    #[builder(default)]
15269    pub test: Option<PredicateCompositionElement>,
15270    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15271    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15272    /// between `0` to `1` for opacity).
15273    #[serde(skip_serializing_if = "Option::is_none")]
15274    #[builder(default)]
15275    pub value: Option<f64>,
15276    /// Vega expression (which can refer to Vega-Lite parameters).
15277    #[serde(skip_serializing_if = "Option::is_none")]
15278    #[builder(default)]
15279    pub expr: Option<String>,
15280}
15281
15282#[derive(Debug, Clone, Serialize, Deserialize)]
15283#[serde(untagged)]
15284#[derive(From)]
15285pub enum GridOpacityUnion {
15286    Double(f64),
15287    GridOpacityExprRef(GridOpacityExprRef),
15288}
15289
15290/// An expression for an array of raw values that, if non-null, directly overrides the
15291/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15292/// a scale. The scale may be initially determined using a data-driven domain, then modified
15293/// in response to user input by setting the rawDomain value.
15294#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15295#[builder(setter(into, strip_option))]
15296pub struct GridOpacityExprRef {
15297    /// Vega expression (which can refer to Vega-Lite parameters).
15298    #[serde(skip_serializing_if = "Option::is_none")]
15299    #[builder(default)]
15300    pub expr: Option<String>,
15301    #[serde(skip_serializing_if = "Option::is_none")]
15302    #[builder(default)]
15303    pub condition: Option<StickyConditionalPredicateValueDefNumberNullExprRef>,
15304    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15305    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15306    /// between `0` to `1` for opacity).
15307    #[serde(skip_serializing_if = "Option::is_none")]
15308    #[builder(default)]
15309    pub value: Option<f64>,
15310}
15311
15312#[derive(Debug, Clone, Serialize, Deserialize)]
15313#[serde(untagged)]
15314#[derive(From)]
15315pub enum GridWidthUnion {
15316    Double(f64),
15317    GridWidthExprRef(GridWidthExprRef),
15318}
15319
15320/// An expression for an array of raw values that, if non-null, directly overrides the
15321/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15322/// a scale. The scale may be initially determined using a data-driven domain, then modified
15323/// in response to user input by setting the rawDomain value.
15324#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15325#[builder(setter(into, strip_option))]
15326pub struct GridWidthExprRef {
15327    /// Vega expression (which can refer to Vega-Lite parameters).
15328    #[serde(skip_serializing_if = "Option::is_none")]
15329    #[builder(default)]
15330    pub expr: Option<String>,
15331    #[serde(skip_serializing_if = "Option::is_none")]
15332    #[builder(default)]
15333    pub condition: Option<StickyConditionalPredicateValueDefNumberNullExprRef>,
15334    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15335    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15336    /// between `0` to `1` for opacity).
15337    #[serde(skip_serializing_if = "Option::is_none")]
15338    #[builder(default)]
15339    pub value: Option<f64>,
15340}
15341
15342#[derive(Debug, Clone, Serialize, Deserialize)]
15343#[serde(untagged)]
15344#[derive(From)]
15345pub enum ConditionalAxisPropertyAlignNull {
15346    Enum(Align),
15347    FluffyExprRef(FluffyExprRef),
15348}
15349
15350/// An expression for an array of raw values that, if non-null, directly overrides the
15351/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15352/// a scale. The scale may be initially determined using a data-driven domain, then modified
15353/// in response to user input by setting the rawDomain value.
15354#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15355#[builder(setter(into, strip_option))]
15356pub struct FluffyExprRef {
15357    /// Vega expression (which can refer to Vega-Lite parameters).
15358    #[serde(skip_serializing_if = "Option::is_none")]
15359    #[builder(default)]
15360    pub expr: Option<String>,
15361    #[serde(skip_serializing_if = "Option::is_none")]
15362    #[builder(default)]
15363    pub condition: Option<ExprRefCondition>,
15364    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15365    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15366    /// between `0` to `1` for opacity).
15367    #[serde(skip_serializing_if = "Option::is_none")]
15368    #[builder(default)]
15369    pub value: Option<Align>,
15370}
15371
15372#[derive(Debug, Clone, Serialize, Deserialize)]
15373#[serde(untagged)]
15374#[derive(From)]
15375pub enum ExprRefCondition {
15376    ConditionCondition(ConditionCondition),
15377    ConditionalPredicateValueDefAlignNullExprRefArray(
15378        Vec<ConditionalPredicateValueDefAlignNullExprRef>,
15379    ),
15380}
15381
15382#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15383#[builder(setter(into, strip_option))]
15384pub struct ConditionalPredicateValueDefAlignNullExprRef {
15385    /// Predicate for triggering the condition
15386    #[serde(skip_serializing_if = "Option::is_none")]
15387    #[builder(default)]
15388    pub test: Option<PredicateCompositionElement>,
15389    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15390    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15391    /// between `0` to `1` for opacity).
15392    #[serde(skip_serializing_if = "Option::is_none")]
15393    #[builder(default)]
15394    pub value: Option<Align>,
15395    /// Vega expression (which can refer to Vega-Lite parameters).
15396    #[serde(skip_serializing_if = "Option::is_none")]
15397    #[builder(default)]
15398    pub expr: Option<String>,
15399}
15400
15401#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15402#[builder(setter(into, strip_option))]
15403pub struct ConditionCondition {
15404    /// Predicate for triggering the condition
15405    #[serde(skip_serializing_if = "Option::is_none")]
15406    #[builder(default)]
15407    pub test: Option<PredicateCompositionElement>,
15408    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15409    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15410    /// between `0` to `1` for opacity).
15411    #[serde(skip_serializing_if = "Option::is_none")]
15412    #[builder(default)]
15413    pub value: Option<Align>,
15414    /// Vega expression (which can refer to Vega-Lite parameters).
15415    #[serde(skip_serializing_if = "Option::is_none")]
15416    #[builder(default)]
15417    pub expr: Option<String>,
15418}
15419
15420#[derive(Debug, Clone, Serialize, Deserialize)]
15421#[serde(untagged)]
15422#[derive(From)]
15423pub enum LabelAngle {
15424    BackgroundExprRef(BackgroundExprRef),
15425    Double(f64),
15426}
15427
15428#[derive(Debug, Clone, Serialize, Deserialize)]
15429#[serde(untagged)]
15430#[derive(From)]
15431pub enum PurpleTextBaseline {
15432    Enum(Baseline),
15433    TentacledExprRef(TentacledExprRef),
15434}
15435
15436/// An expression for an array of raw values that, if non-null, directly overrides the
15437/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15438/// a scale. The scale may be initially determined using a data-driven domain, then modified
15439/// in response to user input by setting the rawDomain value.
15440#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15441#[builder(setter(into, strip_option))]
15442pub struct TentacledExprRef {
15443    /// Vega expression (which can refer to Vega-Lite parameters).
15444    #[serde(skip_serializing_if = "Option::is_none")]
15445    #[builder(default)]
15446    pub expr: Option<String>,
15447    #[serde(skip_serializing_if = "Option::is_none")]
15448    #[builder(default)]
15449    pub condition: Option<ExprRefConditionUnion>,
15450    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15451    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15452    /// between `0` to `1` for opacity).
15453    #[serde(skip_serializing_if = "Option::is_none")]
15454    #[builder(default)]
15455    pub value: Option<Baseline>,
15456}
15457
15458#[derive(Debug, Clone, Serialize, Deserialize)]
15459#[serde(untagged)]
15460#[derive(From)]
15461pub enum ExprRefConditionUnion {
15462    ConditionConditionClass(ConditionConditionClass),
15463    ConditionalPredicateValueDefTextBaselineNullExprRefArray(
15464        Vec<ConditionalPredicateValueDefTextBaselineNullExprRef>,
15465    ),
15466}
15467
15468#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15469#[builder(setter(into, strip_option))]
15470pub struct ConditionalPredicateValueDefTextBaselineNullExprRef {
15471    /// Predicate for triggering the condition
15472    #[serde(skip_serializing_if = "Option::is_none")]
15473    #[builder(default)]
15474    pub test: Option<PredicateCompositionElement>,
15475    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15476    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15477    /// between `0` to `1` for opacity).
15478    #[serde(skip_serializing_if = "Option::is_none")]
15479    #[builder(default)]
15480    pub value: Option<Baseline>,
15481    /// Vega expression (which can refer to Vega-Lite parameters).
15482    #[serde(skip_serializing_if = "Option::is_none")]
15483    #[builder(default)]
15484    pub expr: Option<String>,
15485}
15486
15487#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15488#[builder(setter(into, strip_option))]
15489pub struct ConditionConditionClass {
15490    /// Predicate for triggering the condition
15491    #[serde(skip_serializing_if = "Option::is_none")]
15492    #[builder(default)]
15493    pub test: Option<PredicateCompositionElement>,
15494    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15495    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15496    /// between `0` to `1` for opacity).
15497    #[serde(skip_serializing_if = "Option::is_none")]
15498    #[builder(default)]
15499    pub value: Option<Baseline>,
15500    /// Vega expression (which can refer to Vega-Lite parameters).
15501    #[serde(skip_serializing_if = "Option::is_none")]
15502    #[builder(default)]
15503    pub expr: Option<String>,
15504}
15505
15506#[derive(Debug, Clone, Serialize, Deserialize)]
15507#[serde(untagged)]
15508#[derive(From)]
15509pub enum Label {
15510    BackgroundExprRef(BackgroundExprRef),
15511    Bool(bool),
15512    Double(f64),
15513}
15514
15515/// Indicates if labels should be hidden if they exceed the axis range. If `false` (the
15516/// default) no bounds overlap analysis is performed. If `true`, labels will be hidden if
15517/// they exceed the axis range by more than 1 pixel. If this property is a number, it
15518/// specifies the pixel tolerance: the maximum amount by which a label bounding box may
15519/// exceed the axis range.
15520///
15521/// __Default value:__ `false`.
15522///
15523/// Indicates if the first and last axis labels should be aligned flush with the scale range.
15524/// Flush alignment for a horizontal axis will left-align the first label and right-align the
15525/// last label. For vertical axes, bottom and top text baselines are applied instead. If this
15526/// property is a number, it also indicates the number of pixels by which to offset the first
15527/// and last labels; for example, a value of 2 will flush-align the first and last labels and
15528/// also push them 2 pixels outward from the center of the axis. The additional adjustment
15529/// can sometimes help the labels better visually group with corresponding axis ticks.
15530///
15531/// __Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.
15532#[derive(Debug, Clone, Serialize, Deserialize)]
15533#[serde(untagged)]
15534#[derive(From)]
15535pub enum LabelFlush {
15536    Bool(bool),
15537    Double(f64),
15538}
15539
15540#[derive(Debug, Clone, Serialize, Deserialize)]
15541#[serde(untagged)]
15542#[derive(From)]
15543pub enum ConditionalAxisPropertyStringNull {
15544    StickyExprRef(StickyExprRef),
15545    String(String),
15546}
15547
15548/// An expression for an array of raw values that, if non-null, directly overrides the
15549/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15550/// a scale. The scale may be initially determined using a data-driven domain, then modified
15551/// in response to user input by setting the rawDomain value.
15552#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15553#[builder(setter(into, strip_option))]
15554pub struct StickyExprRef {
15555    /// Vega expression (which can refer to Vega-Lite parameters).
15556    #[serde(skip_serializing_if = "Option::is_none")]
15557    #[builder(default)]
15558    pub expr: Option<String>,
15559    #[serde(skip_serializing_if = "Option::is_none")]
15560    #[builder(default)]
15561    pub condition: Option<FluffyConditionalPredicateValueDefStringNullExprRef>,
15562    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15563    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15564    /// between `0` to `1` for opacity).
15565    #[serde(skip_serializing_if = "Option::is_none")]
15566    #[builder(default)]
15567    pub value: Option<String>,
15568}
15569
15570#[derive(Debug, Clone, Serialize, Deserialize)]
15571#[serde(untagged)]
15572#[derive(From)]
15573pub enum FluffyConditionalPredicateValueDefStringNullExprRef {
15574    ConditionalPredicateValueDefStringNullExprRefArray(
15575        Vec<ConditionalPredicateValueDefStringNullExprRef>,
15576    ),
15577    PurpleConditionalPredicateValueDefStringNullExprRef(
15578        PurpleConditionalPredicateValueDefStringNullExprRef,
15579    ),
15580}
15581
15582#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15583#[builder(setter(into, strip_option))]
15584pub struct ConditionalPredicateValueDefStringNullExprRef {
15585    /// Predicate for triggering the condition
15586    #[serde(skip_serializing_if = "Option::is_none")]
15587    #[builder(default)]
15588    pub test: Option<PredicateCompositionElement>,
15589    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15590    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15591    /// between `0` to `1` for opacity).
15592    #[serde(skip_serializing_if = "Option::is_none")]
15593    #[builder(default)]
15594    pub value: Option<String>,
15595    /// Vega expression (which can refer to Vega-Lite parameters).
15596    #[serde(skip_serializing_if = "Option::is_none")]
15597    #[builder(default)]
15598    pub expr: Option<String>,
15599}
15600
15601#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15602#[builder(setter(into, strip_option))]
15603pub struct PurpleConditionalPredicateValueDefStringNullExprRef {
15604    /// Predicate for triggering the condition
15605    #[serde(skip_serializing_if = "Option::is_none")]
15606    #[builder(default)]
15607    pub test: Option<PredicateCompositionElement>,
15608    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15609    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15610    /// between `0` to `1` for opacity).
15611    #[serde(skip_serializing_if = "Option::is_none")]
15612    #[builder(default)]
15613    pub value: Option<String>,
15614    /// Vega expression (which can refer to Vega-Lite parameters).
15615    #[serde(skip_serializing_if = "Option::is_none")]
15616    #[builder(default)]
15617    pub expr: Option<String>,
15618}
15619
15620#[derive(Debug, Clone, Serialize, Deserialize)]
15621#[serde(untagged)]
15622#[derive(From)]
15623pub enum ConditionalAxisPropertyFontStyleNull {
15624    IndigoExprRef(IndigoExprRef),
15625    String(String),
15626}
15627
15628/// An expression for an array of raw values that, if non-null, directly overrides the
15629/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15630/// a scale. The scale may be initially determined using a data-driven domain, then modified
15631/// in response to user input by setting the rawDomain value.
15632#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15633#[builder(setter(into, strip_option))]
15634pub struct IndigoExprRef {
15635    /// Vega expression (which can refer to Vega-Lite parameters).
15636    #[serde(skip_serializing_if = "Option::is_none")]
15637    #[builder(default)]
15638    pub expr: Option<String>,
15639    #[serde(skip_serializing_if = "Option::is_none")]
15640    #[builder(default)]
15641    pub condition: Option<FluffyConditionalPredicateValueDefFontStyleNullExprRef>,
15642    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15643    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15644    /// between `0` to `1` for opacity).
15645    #[serde(skip_serializing_if = "Option::is_none")]
15646    #[builder(default)]
15647    pub value: Option<String>,
15648}
15649
15650#[derive(Debug, Clone, Serialize, Deserialize)]
15651#[serde(untagged)]
15652#[derive(From)]
15653pub enum FluffyConditionalPredicateValueDefFontStyleNullExprRef {
15654    ConditionalPredicateValueDefFontStyleNullExprRefArray(
15655        Vec<ConditionalPredicateValueDefFontStyleNullExprRef>,
15656    ),
15657    PurpleConditionalPredicateValueDefFontStyleNullExprRef(
15658        PurpleConditionalPredicateValueDefFontStyleNullExprRef,
15659    ),
15660}
15661
15662#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15663#[builder(setter(into, strip_option))]
15664pub struct ConditionalPredicateValueDefFontStyleNullExprRef {
15665    /// Predicate for triggering the condition
15666    #[serde(skip_serializing_if = "Option::is_none")]
15667    #[builder(default)]
15668    pub test: Option<PredicateCompositionElement>,
15669    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15670    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15671    /// between `0` to `1` for opacity).
15672    #[serde(skip_serializing_if = "Option::is_none")]
15673    #[builder(default)]
15674    pub value: Option<String>,
15675    /// Vega expression (which can refer to Vega-Lite parameters).
15676    #[serde(skip_serializing_if = "Option::is_none")]
15677    #[builder(default)]
15678    pub expr: Option<String>,
15679}
15680
15681#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15682#[builder(setter(into, strip_option))]
15683pub struct PurpleConditionalPredicateValueDefFontStyleNullExprRef {
15684    /// Predicate for triggering the condition
15685    #[serde(skip_serializing_if = "Option::is_none")]
15686    #[builder(default)]
15687    pub test: Option<PredicateCompositionElement>,
15688    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15689    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15690    /// between `0` to `1` for opacity).
15691    #[serde(skip_serializing_if = "Option::is_none")]
15692    #[builder(default)]
15693    pub value: Option<String>,
15694    /// Vega expression (which can refer to Vega-Lite parameters).
15695    #[serde(skip_serializing_if = "Option::is_none")]
15696    #[builder(default)]
15697    pub expr: Option<String>,
15698}
15699
15700#[derive(Debug, Clone, Serialize, Deserialize)]
15701#[serde(untagged)]
15702#[derive(From)]
15703pub enum FontWeight {
15704    Double(f64),
15705    Enum(FontWeightEnum),
15706    IndecentExprRef(IndecentExprRef),
15707}
15708
15709/// An expression for an array of raw values that, if non-null, directly overrides the
15710/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15711/// a scale. The scale may be initially determined using a data-driven domain, then modified
15712/// in response to user input by setting the rawDomain value.
15713#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15714#[builder(setter(into, strip_option))]
15715pub struct IndecentExprRef {
15716    /// Vega expression (which can refer to Vega-Lite parameters).
15717    #[serde(skip_serializing_if = "Option::is_none")]
15718    #[builder(default)]
15719    pub expr: Option<String>,
15720    #[serde(skip_serializing_if = "Option::is_none")]
15721    #[builder(default)]
15722    pub condition: Option<FluffyConditionalPredicateValueDefFontWeightNullExprRef>,
15723    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15724    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15725    /// between `0` to `1` for opacity).
15726    #[serde(skip_serializing_if = "Option::is_none")]
15727    #[builder(default)]
15728    pub value: Option<ValueUnion>,
15729}
15730
15731#[derive(Debug, Clone, Serialize, Deserialize)]
15732#[serde(untagged)]
15733#[derive(From)]
15734pub enum FluffyConditionalPredicateValueDefFontWeightNullExprRef {
15735    ConditionalPredicateValueDefFontWeightNullExprRefArray(
15736        Vec<ConditionalPredicateValueDefFontWeightNullExprRef>,
15737    ),
15738    PurpleConditionalPredicateValueDefFontWeightNullExprRef(
15739        PurpleConditionalPredicateValueDefFontWeightNullExprRef,
15740    ),
15741}
15742
15743#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15744#[builder(setter(into, strip_option))]
15745pub struct ConditionalPredicateValueDefFontWeightNullExprRef {
15746    /// Predicate for triggering the condition
15747    #[serde(skip_serializing_if = "Option::is_none")]
15748    #[builder(default)]
15749    pub test: Option<PredicateCompositionElement>,
15750    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15751    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15752    /// between `0` to `1` for opacity).
15753    #[serde(skip_serializing_if = "Option::is_none")]
15754    #[builder(default)]
15755    pub value: Option<ValueUnion>,
15756    /// Vega expression (which can refer to Vega-Lite parameters).
15757    #[serde(skip_serializing_if = "Option::is_none")]
15758    #[builder(default)]
15759    pub expr: Option<String>,
15760}
15761
15762#[derive(Debug, Clone, Serialize, Deserialize)]
15763#[serde(untagged)]
15764#[derive(From)]
15765pub enum ValueUnion {
15766    Double(f64),
15767    Enum(FontWeightEnum),
15768}
15769
15770#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15771#[builder(setter(into, strip_option))]
15772pub struct PurpleConditionalPredicateValueDefFontWeightNullExprRef {
15773    /// Predicate for triggering the condition
15774    #[serde(skip_serializing_if = "Option::is_none")]
15775    #[builder(default)]
15776    pub test: Option<PredicateCompositionElement>,
15777    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15778    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15779    /// between `0` to `1` for opacity).
15780    #[serde(skip_serializing_if = "Option::is_none")]
15781    #[builder(default)]
15782    pub value: Option<ValueUnion>,
15783    /// Vega expression (which can refer to Vega-Lite parameters).
15784    #[serde(skip_serializing_if = "Option::is_none")]
15785    #[builder(default)]
15786    pub expr: Option<String>,
15787}
15788
15789#[derive(Debug, Clone, Serialize, Deserialize)]
15790#[serde(untagged)]
15791#[derive(From)]
15792pub enum TickBandUnion {
15793    BackgroundExprRef(BackgroundExprRef),
15794    Enum(TickBandEnum),
15795}
15796
15797/// For band scales, indicates if ticks and grid lines should be placed at the `"center"` of
15798/// a band (default) or at the band `"extent"`s to indicate intervals
15799#[derive(Debug, Clone, Serialize, Deserialize)]
15800#[serde(rename_all = "snake_case")]
15801pub enum TickBandEnum {
15802    Center,
15803    Extent,
15804}
15805
15806#[derive(Debug, Clone, Serialize, Deserialize)]
15807#[serde(untagged)]
15808#[derive(From)]
15809pub enum AxisTickDash {
15810    DoubleArray(Vec<f64>),
15811    HilariousExprRef(HilariousExprRef),
15812}
15813
15814/// An expression for an array of raw values that, if non-null, directly overrides the
15815/// _domain_ property. This is useful for supporting interactions such as panning or zooming
15816/// a scale. The scale may be initially determined using a data-driven domain, then modified
15817/// in response to user input by setting the rawDomain value.
15818#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15819#[builder(setter(into, strip_option))]
15820pub struct HilariousExprRef {
15821    /// Vega expression (which can refer to Vega-Lite parameters).
15822    #[serde(skip_serializing_if = "Option::is_none")]
15823    #[builder(default)]
15824    pub expr: Option<String>,
15825    #[serde(skip_serializing_if = "Option::is_none")]
15826    #[builder(default)]
15827    pub condition: Option<TentacledConditionalPredicateValueDefNumberNullExprRef>,
15828    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
15829    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
15830    /// between `0` to `1` for opacity).
15831    #[serde(skip_serializing_if = "Option::is_none")]
15832    #[builder(default)]
15833    pub value: Option<Vec<f64>>,
15834}
15835
15836#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15837#[builder(setter(into, strip_option))]
15838pub struct ImputeParams {
15839    /// A frame specification as a two-element array used to control the window over which the
15840    /// specified method is applied. The array entries should either be a number indicating the
15841    /// offset from the current data object, or null to indicate unbounded rows preceding or
15842    /// following the current data object. For example, the value `[-5, 5]` indicates that the
15843    /// window should include five objects preceding and five objects following the current
15844    /// object.
15845    ///
15846    /// __Default value:__:  `[null, null]` indicating that the window includes all objects.
15847    #[serde(skip_serializing_if = "Option::is_none")]
15848    #[builder(default)]
15849    pub frame: Option<Vec<Option<f64>>>,
15850    /// Defines the key values that should be considered for imputation. An array of key values
15851    /// or an object defining a [number
15852    /// sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).
15853    ///
15854    /// If provided, this will be used in addition to the key values observed within the input
15855    /// data. If not provided, the values will be derived from all unique values of the `key`
15856    /// field. For `impute` in `encoding`, the key field is the x-field if the y-field is
15857    /// imputed, or vice versa.
15858    ///
15859    /// If there is no impute grouping, this property _must_ be specified.
15860    #[serde(skip_serializing_if = "Option::is_none")]
15861    #[builder(default)]
15862    pub keyvals: Option<Keyvals>,
15863    /// The imputation method to use for the field value of imputed data objects. One of
15864    /// `"value"`, `"mean"`, `"median"`, `"max"` or `"min"`.
15865    ///
15866    /// __Default value:__  `"value"`
15867    #[serde(skip_serializing_if = "Option::is_none")]
15868    #[builder(default)]
15869    pub method: Option<ImputeParamsMethod>,
15870    /// The field value to use when the imputation `method` is `"value"`.
15871    #[serde(skip_serializing_if = "Option::is_none")]
15872    #[builder(default)]
15873    pub value: Option<serde_json::Value>,
15874}
15875
15876#[derive(Debug, Clone, Serialize, Deserialize)]
15877#[serde(untagged)]
15878#[derive(From)]
15879pub enum Keyvals {
15880    AnythingArray(Vec<Option<serde_json::Value>>),
15881    ImputeSequence(ImputeSequence),
15882}
15883
15884#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
15885#[builder(setter(into, strip_option))]
15886pub struct ImputeSequence {
15887    /// The starting value of the sequence. __Default value:__ `0`
15888    #[serde(skip_serializing_if = "Option::is_none")]
15889    #[builder(default)]
15890    pub start: Option<f64>,
15891    /// The step value between sequence entries. __Default value:__ `1` or `-1` if `stop < start`
15892    #[serde(skip_serializing_if = "Option::is_none")]
15893    #[builder(default)]
15894    pub step: Option<f64>,
15895    /// The ending value(exclusive) of the sequence.
15896    #[serde(skip_serializing_if = "Option::is_none")]
15897    #[builder(default)]
15898    pub stop: Option<f64>,
15899}
15900
15901/// The imputation method to use for the field value of imputed data objects. One of
15902/// `"value"`, `"mean"`, `"median"`, `"max"` or `"min"`.
15903///
15904/// __Default value:__  `"value"`
15905#[derive(Debug, Clone, Serialize, Deserialize)]
15906#[serde(rename_all = "snake_case")]
15907pub enum ImputeParamsMethod {
15908    Max,
15909    Mean,
15910    Median,
15911    Min,
15912    Value,
15913}
15914
15915/// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
15916/// `"rule"`.
15917///
15918/// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
15919/// and  `"rule"`.
15920///
15921/// The inner radius in pixels of arc marks.
15922///
15923/// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
15924/// values proceed clockwise.
15925///
15926/// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
15927///
15928/// The `value` of this channel can be a number or a string `"width"` for the width of the
15929/// plot.
15930///
15931/// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
15932///
15933/// The `value` of this channel can be a number or a string `"height"` for the height of the
15934/// plot.
15935///
15936/// A field definition of a secondary channel that shares a scale with another primary
15937/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
15938///
15939/// Definition object for a constant value (primitive value or gradient definition) of an
15940/// encoding channel.
15941#[derive(Debug, Clone, Serialize, Deserialize)]
15942#[serde(rename_all = "camelCase")]
15943#[derive(Default, Builder)]
15944#[builder(setter(into, strip_option))]
15945pub struct X2Class {
15946    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
15947    /// `"max"`, `"count"`).
15948    ///
15949    /// __Default value:__ `undefined` (None)
15950    ///
15951    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
15952    /// documentation.
15953    #[serde(skip_serializing_if = "Option::is_none")]
15954    #[builder(default)]
15955    pub aggregate: Option<Aggregate>,
15956    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
15957    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
15958    /// middle of the band if set to `0.5`.
15959    #[serde(skip_serializing_if = "Option::is_none")]
15960    #[builder(default)]
15961    pub band_position: Option<f64>,
15962    /// A flag for binning a `quantitative` field, [an object defining binning
15963    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
15964    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
15965    /// (`"binned"`).
15966    ///
15967    /// - If `true`, default [binning
15968    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
15969    /// applied.
15970    ///
15971    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
15972    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
15973    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
15974    /// the axis ticks based on the bin step, you can also set the axis's
15975    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
15976    ///
15977    /// __Default value:__ `false`
15978    ///
15979    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
15980    #[serde(skip_serializing_if = "Option::is_none")]
15981    #[builder(default)]
15982    pub bin: Option<serde_json::Value>,
15983    /// __Required.__ A string defining the name of the field from which to pull a data value or
15984    /// an object defining iterated values from the
15985    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
15986    ///
15987    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
15988    ///
15989    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
15990    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
15991    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
15992    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
15993    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
15994    /// required if `aggregate` is `count`.
15995    #[serde(skip_serializing_if = "Option::is_none")]
15996    #[builder(default)]
15997    pub field: Option<Field>,
15998    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
15999    /// temporal field that gets casted as
16000    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
16001    ///
16002    /// __Default value:__ `undefined` (None)
16003    ///
16004    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
16005    /// documentation.
16006    #[serde(skip_serializing_if = "Option::is_none")]
16007    #[builder(default)]
16008    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
16009    /// A title for the field. If `null`, the title will be removed.
16010    ///
16011    /// __Default value:__  derived from the field's name and transformation function
16012    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
16013    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
16014    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
16015    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
16016    /// name.
16017    ///
16018    /// __Notes__:
16019    ///
16020    /// 1) You can customize the default field title format by providing the
16021    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
16022    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
16023    /// [`fieldTitle` function via the `compile` function's
16024    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
16025    ///
16026    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
16027    /// axis/header/legend title will be used.
16028    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16029    #[builder(default)]
16030    pub title: RemovableValue<LegendText>,
16031    /// A constant value in data domain.
16032    #[serde(skip_serializing_if = "Option::is_none")]
16033    #[builder(default)]
16034    pub datum: Option<PrimitiveValue>,
16035    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
16036    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
16037    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
16038    ///
16039    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
16040    /// is required for a field if: (1) the field is not nominal and the field encoding has no
16041    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
16042    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
16043    /// or `timeUnit`.
16044    ///
16045    /// __Default value:__
16046    ///
16047    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
16048    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
16049    /// following criteria:
16050    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
16051    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
16052    /// `longitude` channel or (3) if the specified scale type is [a quantitative
16053    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
16054    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
16055    /// the specified scale type is a time or utc scale
16056    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
16057    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
16058    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
16059    /// `order`.
16060    ///
16061    /// 2) For a constant value in data domain (`datum`):
16062    /// - `"quantitative"` if the datum is a number
16063    /// - `"nominal"` if the datum is a string
16064    /// - `"temporal"` if the datum is [a date time
16065    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
16066    ///
16067    /// __Note:__
16068    /// - Data `type` describes the semantics of the data rather than the primitive data types
16069    /// (number, string, etc.). The same primitive data type can have different types of
16070    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
16071    /// data.
16072    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
16073    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
16074    /// `1552199579097`).
16075    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
16076    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
16077    /// (for using an ordinal bin
16078    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
16079    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
16080    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
16081    /// [`"ordinal"` (for using an ordinal
16082    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
16083    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
16084    /// the `type` property refers to the post-aggregation data type. For example, we can
16085    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
16086    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
16087    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
16088    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
16089    ///
16090    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
16091    #[serde(rename = "type")]
16092    #[serde(skip_serializing_if = "Option::is_none")]
16093    #[builder(default)]
16094    pub position2_def_type: Option<Type>,
16095    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
16096    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
16097    /// between `0` to `1` for opacity).
16098    #[serde(skip_serializing_if = "Option::is_none")]
16099    #[builder(default)]
16100    pub value: Option<Latitude2Value>,
16101}
16102
16103/// Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
16104///
16105/// Secondary error value of x coordinates for error specified `"errorbar"` and
16106/// `"errorband"`.
16107///
16108/// Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
16109///
16110/// Secondary error value of y coordinates for error specified `"errorbar"` and
16111/// `"errorband"`.
16112///
16113/// A field definition of a secondary channel that shares a scale with another primary
16114/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
16115///
16116/// Definition object for a constant value (primitive value or gradient definition) of an
16117/// encoding channel.
16118#[derive(Debug, Clone, Serialize, Deserialize)]
16119#[serde(rename_all = "camelCase")]
16120#[derive(Default, Builder)]
16121#[builder(setter(into, strip_option))]
16122pub struct XErrorClass {
16123    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
16124    /// `"max"`, `"count"`).
16125    ///
16126    /// __Default value:__ `undefined` (None)
16127    ///
16128    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
16129    /// documentation.
16130    #[serde(skip_serializing_if = "Option::is_none")]
16131    #[builder(default)]
16132    pub aggregate: Option<Aggregate>,
16133    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
16134    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
16135    /// middle of the band if set to `0.5`.
16136    #[serde(skip_serializing_if = "Option::is_none")]
16137    #[builder(default)]
16138    pub band_position: Option<f64>,
16139    /// A flag for binning a `quantitative` field, [an object defining binning
16140    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
16141    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
16142    /// (`"binned"`).
16143    ///
16144    /// - If `true`, default [binning
16145    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
16146    /// applied.
16147    ///
16148    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
16149    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
16150    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
16151    /// the axis ticks based on the bin step, you can also set the axis's
16152    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
16153    ///
16154    /// __Default value:__ `false`
16155    ///
16156    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
16157    #[serde(skip_serializing_if = "Option::is_none")]
16158    #[builder(default)]
16159    pub bin: Option<serde_json::Value>,
16160    /// __Required.__ A string defining the name of the field from which to pull a data value or
16161    /// an object defining iterated values from the
16162    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
16163    ///
16164    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
16165    ///
16166    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
16167    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
16168    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
16169    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
16170    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
16171    /// required if `aggregate` is `count`.
16172    #[serde(skip_serializing_if = "Option::is_none")]
16173    #[builder(default)]
16174    pub field: Option<Field>,
16175    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
16176    /// temporal field that gets casted as
16177    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
16178    ///
16179    /// __Default value:__ `undefined` (None)
16180    ///
16181    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
16182    /// documentation.
16183    #[serde(skip_serializing_if = "Option::is_none")]
16184    #[builder(default)]
16185    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
16186    /// A title for the field. If `null`, the title will be removed.
16187    ///
16188    /// __Default value:__  derived from the field's name and transformation function
16189    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
16190    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
16191    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
16192    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
16193    /// name.
16194    ///
16195    /// __Notes__:
16196    ///
16197    /// 1) You can customize the default field title format by providing the
16198    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
16199    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
16200    /// [`fieldTitle` function via the `compile` function's
16201    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
16202    ///
16203    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
16204    /// axis/header/legend title will be used.
16205    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16206    #[builder(default)]
16207    pub title: RemovableValue<LegendText>,
16208    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
16209    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
16210    /// between `0` to `1` for opacity).
16211    #[serde(skip_serializing_if = "Option::is_none")]
16212    #[builder(default)]
16213    pub value: Option<f64>,
16214}
16215
16216/// Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
16217///
16218/// Secondary error value of x coordinates for error specified `"errorbar"` and
16219/// `"errorband"`.
16220///
16221/// Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
16222///
16223/// Secondary error value of y coordinates for error specified `"errorbar"` and
16224/// `"errorband"`.
16225///
16226/// A field definition of a secondary channel that shares a scale with another primary
16227/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
16228///
16229/// Definition object for a constant value (primitive value or gradient definition) of an
16230/// encoding channel.
16231#[derive(Debug, Clone, Serialize, Deserialize)]
16232#[serde(rename_all = "camelCase")]
16233#[derive(Default, Builder)]
16234#[builder(setter(into, strip_option))]
16235pub struct XError2Class {
16236    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
16237    /// `"max"`, `"count"`).
16238    ///
16239    /// __Default value:__ `undefined` (None)
16240    ///
16241    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
16242    /// documentation.
16243    #[serde(skip_serializing_if = "Option::is_none")]
16244    #[builder(default)]
16245    pub aggregate: Option<Aggregate>,
16246    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
16247    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
16248    /// middle of the band if set to `0.5`.
16249    #[serde(skip_serializing_if = "Option::is_none")]
16250    #[builder(default)]
16251    pub band_position: Option<f64>,
16252    /// A flag for binning a `quantitative` field, [an object defining binning
16253    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
16254    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
16255    /// (`"binned"`).
16256    ///
16257    /// - If `true`, default [binning
16258    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
16259    /// applied.
16260    ///
16261    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
16262    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
16263    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
16264    /// the axis ticks based on the bin step, you can also set the axis's
16265    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
16266    ///
16267    /// __Default value:__ `false`
16268    ///
16269    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
16270    #[serde(skip_serializing_if = "Option::is_none")]
16271    #[builder(default)]
16272    pub bin: Option<serde_json::Value>,
16273    /// __Required.__ A string defining the name of the field from which to pull a data value or
16274    /// an object defining iterated values from the
16275    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
16276    ///
16277    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
16278    ///
16279    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
16280    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
16281    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
16282    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
16283    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
16284    /// required if `aggregate` is `count`.
16285    #[serde(skip_serializing_if = "Option::is_none")]
16286    #[builder(default)]
16287    pub field: Option<Field>,
16288    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
16289    /// temporal field that gets casted as
16290    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
16291    ///
16292    /// __Default value:__ `undefined` (None)
16293    ///
16294    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
16295    /// documentation.
16296    #[serde(skip_serializing_if = "Option::is_none")]
16297    #[builder(default)]
16298    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
16299    /// A title for the field. If `null`, the title will be removed.
16300    ///
16301    /// __Default value:__  derived from the field's name and transformation function
16302    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
16303    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
16304    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
16305    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
16306    /// name.
16307    ///
16308    /// __Notes__:
16309    ///
16310    /// 1) You can customize the default field title format by providing the
16311    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
16312    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
16313    /// [`fieldTitle` function via the `compile` function's
16314    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
16315    ///
16316    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
16317    /// axis/header/legend title will be used.
16318    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16319    #[builder(default)]
16320    pub title: RemovableValue<LegendText>,
16321    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
16322    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
16323    /// between `0` to `1` for opacity).
16324    #[serde(skip_serializing_if = "Option::is_none")]
16325    #[builder(default)]
16326    pub value: Option<f64>,
16327}
16328
16329/// Offset of x-position of the marks
16330///
16331/// Offset of y-position of the marks
16332///
16333/// Definition object for a constant value (primitive value or gradient definition) of an
16334/// encoding channel.
16335#[derive(Debug, Clone, Serialize, Deserialize)]
16336#[serde(rename_all = "camelCase")]
16337#[derive(Default, Builder)]
16338#[builder(setter(into, strip_option))]
16339pub struct XOffsetClass {
16340    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
16341    /// `"max"`, `"count"`).
16342    ///
16343    /// __Default value:__ `undefined` (None)
16344    ///
16345    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
16346    /// documentation.
16347    #[serde(skip_serializing_if = "Option::is_none")]
16348    #[builder(default)]
16349    pub aggregate: Option<Aggregate>,
16350    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
16351    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
16352    /// middle of the band if set to `0.5`.
16353    #[serde(skip_serializing_if = "Option::is_none")]
16354    #[builder(default)]
16355    pub band_position: Option<f64>,
16356    /// A flag for binning a `quantitative` field, [an object defining binning
16357    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
16358    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
16359    /// (`"binned"`).
16360    ///
16361    /// - If `true`, default [binning
16362    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
16363    /// applied.
16364    ///
16365    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
16366    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
16367    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
16368    /// the axis ticks based on the bin step, you can also set the axis's
16369    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
16370    ///
16371    /// __Default value:__ `false`
16372    ///
16373    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
16374    #[serde(skip_serializing_if = "Option::is_none")]
16375    #[builder(default)]
16376    pub bin: Option<AngleBin>,
16377    /// __Required.__ A string defining the name of the field from which to pull a data value or
16378    /// an object defining iterated values from the
16379    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
16380    ///
16381    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
16382    ///
16383    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
16384    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
16385    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
16386    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
16387    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
16388    /// required if `aggregate` is `count`.
16389    #[serde(skip_serializing_if = "Option::is_none")]
16390    #[builder(default)]
16391    pub field: Option<Field>,
16392    /// An object defining properties of the channel's scale, which is the function that
16393    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
16394    /// (pixels, colors, sizes) of the encoding channels.
16395    ///
16396    /// If `null`, the scale will be [disabled and the data value will be directly
16397    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
16398    ///
16399    /// __Default value:__ If undefined, default [scale
16400    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
16401    ///
16402    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
16403    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16404    #[builder(default)]
16405    pub scale: RemovableValue<Scale>,
16406    /// Sort order for the encoded field.
16407    ///
16408    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
16409    /// `"descending"`.
16410    ///
16411    /// For discrete fields, `sort` can be one of the following:
16412    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
16413    /// JavaScript.
16414    /// - [A string indicating an encoding channel name to sort
16415    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
16416    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
16417    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
16418    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
16419    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
16420    /// "descending"}`.
16421    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
16422    /// for sorting by another field.
16423    /// - [An array specifying the field values in preferred
16424    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
16425    /// sort order will obey the values in the array, followed by any unspecified values in their
16426    /// original order. For discrete time field, values in the sort array can be [date-time
16427    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
16428    /// the values can be the month or day names (case insensitive) or their 3-letter initials
16429    /// (e.g., `"Mon"`, `"Tue"`).
16430    /// - `null` indicating no sort.
16431    ///
16432    /// __Default value:__ `"ascending"`
16433    ///
16434    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
16435    ///
16436    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
16437    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16438    #[builder(default)]
16439    pub sort: RemovableValue<SortUnion>,
16440    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
16441    /// temporal field that gets casted as
16442    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
16443    ///
16444    /// __Default value:__ `undefined` (None)
16445    ///
16446    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
16447    /// documentation.
16448    #[serde(skip_serializing_if = "Option::is_none")]
16449    #[builder(default)]
16450    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
16451    /// A title for the field. If `null`, the title will be removed.
16452    ///
16453    /// __Default value:__  derived from the field's name and transformation function
16454    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
16455    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
16456    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
16457    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
16458    /// name.
16459    ///
16460    /// __Notes__:
16461    ///
16462    /// 1) You can customize the default field title format by providing the
16463    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
16464    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
16465    /// [`fieldTitle` function via the `compile` function's
16466    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
16467    ///
16468    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
16469    /// axis/header/legend title will be used.
16470    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16471    #[builder(default)]
16472    pub title: RemovableValue<LegendText>,
16473    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
16474    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
16475    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
16476    ///
16477    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
16478    /// is required for a field if: (1) the field is not nominal and the field encoding has no
16479    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
16480    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
16481    /// or `timeUnit`.
16482    ///
16483    /// __Default value:__
16484    ///
16485    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
16486    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
16487    /// following criteria:
16488    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
16489    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
16490    /// `longitude` channel or (3) if the specified scale type is [a quantitative
16491    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
16492    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
16493    /// the specified scale type is a time or utc scale
16494    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
16495    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
16496    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
16497    /// `order`.
16498    ///
16499    /// 2) For a constant value in data domain (`datum`):
16500    /// - `"quantitative"` if the datum is a number
16501    /// - `"nominal"` if the datum is a string
16502    /// - `"temporal"` if the datum is [a date time
16503    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
16504    ///
16505    /// __Note:__
16506    /// - Data `type` describes the semantics of the data rather than the primitive data types
16507    /// (number, string, etc.). The same primitive data type can have different types of
16508    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
16509    /// data.
16510    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
16511    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
16512    /// `1552199579097`).
16513    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
16514    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
16515    /// (for using an ordinal bin
16516    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
16517    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
16518    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
16519    /// [`"ordinal"` (for using an ordinal
16520    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
16521    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
16522    /// the `type` property refers to the post-aggregation data type. For example, we can
16523    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
16524    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
16525    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
16526    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
16527    ///
16528    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
16529    #[serde(rename = "type")]
16530    #[serde(skip_serializing_if = "Option::is_none")]
16531    #[builder(default)]
16532    pub offset_def_type: Option<Type>,
16533    /// A constant value in data domain.
16534    #[serde(skip_serializing_if = "Option::is_none")]
16535    #[builder(default)]
16536    pub datum: Option<PrimitiveValue>,
16537    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
16538    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
16539    /// between `0` to `1` for opacity).
16540    #[serde(skip_serializing_if = "Option::is_none")]
16541    #[builder(default)]
16542    pub value: Option<f64>,
16543}
16544
16545/// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
16546/// `x2` or `width`.
16547///
16548/// The `value` of this channel can be a number or a string `"width"` for the width of the
16549/// plot.
16550///
16551/// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
16552/// `y2` or `height`.
16553///
16554/// The `value` of this channel can be a number or a string `"height"` for the height of the
16555/// plot.
16556///
16557/// Definition object for a constant value (primitive value or gradient definition) of an
16558/// encoding channel.
16559#[derive(Debug, Clone, Serialize, Deserialize)]
16560#[serde(rename_all = "camelCase")]
16561#[derive(Default, Builder)]
16562#[builder(setter(into, strip_option))]
16563pub struct YClass {
16564    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
16565    /// `"max"`, `"count"`).
16566    ///
16567    /// __Default value:__ `undefined` (None)
16568    ///
16569    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
16570    /// documentation.
16571    #[serde(skip_serializing_if = "Option::is_none")]
16572    #[builder(default)]
16573    pub aggregate: Option<Aggregate>,
16574    /// An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis
16575    /// for the encoding channel will be removed.
16576    ///
16577    /// __Default value:__ If undefined, default [axis
16578    /// properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.
16579    ///
16580    /// __See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation.
16581    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16582    #[builder(default)]
16583    pub axis: RemovableValue<Axis>,
16584    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
16585    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
16586    /// middle of the band if set to `0.5`.
16587    #[serde(skip_serializing_if = "Option::is_none")]
16588    #[builder(default)]
16589    pub band_position: Option<f64>,
16590    /// A flag for binning a `quantitative` field, [an object defining binning
16591    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
16592    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
16593    /// (`"binned"`).
16594    ///
16595    /// - If `true`, default [binning
16596    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
16597    /// applied.
16598    ///
16599    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
16600    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
16601    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
16602    /// the axis ticks based on the bin step, you can also set the axis's
16603    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
16604    ///
16605    /// __Default value:__ `false`
16606    ///
16607    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
16608    #[serde(skip_serializing_if = "Option::is_none")]
16609    #[builder(default)]
16610    pub bin: Option<DescriptionBin>,
16611    /// __Required.__ A string defining the name of the field from which to pull a data value or
16612    /// an object defining iterated values from the
16613    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
16614    ///
16615    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
16616    ///
16617    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
16618    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
16619    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
16620    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
16621    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
16622    /// required if `aggregate` is `count`.
16623    #[serde(skip_serializing_if = "Option::is_none")]
16624    #[builder(default)]
16625    pub field: Option<Field>,
16626    /// An object defining the properties of the Impute Operation to be applied. The field value
16627    /// of the other positional channel is taken as `key` of the `Impute` Operation. The field of
16628    /// the `color` channel if specified is used as `groupby` of the `Impute` Operation.
16629    ///
16630    /// __See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation.
16631    #[serde(skip_serializing_if = "Option::is_none")]
16632    #[builder(default)]
16633    pub impute: Option<ImputeParams>,
16634    /// An object defining properties of the channel's scale, which is the function that
16635    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
16636    /// (pixels, colors, sizes) of the encoding channels.
16637    ///
16638    /// If `null`, the scale will be [disabled and the data value will be directly
16639    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
16640    ///
16641    /// __Default value:__ If undefined, default [scale
16642    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
16643    ///
16644    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
16645    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16646    #[builder(default)]
16647    pub scale: RemovableValue<Scale>,
16648    /// Sort order for the encoded field.
16649    ///
16650    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
16651    /// `"descending"`.
16652    ///
16653    /// For discrete fields, `sort` can be one of the following:
16654    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
16655    /// JavaScript.
16656    /// - [A string indicating an encoding channel name to sort
16657    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
16658    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
16659    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
16660    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
16661    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
16662    /// "descending"}`.
16663    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
16664    /// for sorting by another field.
16665    /// - [An array specifying the field values in preferred
16666    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
16667    /// sort order will obey the values in the array, followed by any unspecified values in their
16668    /// original order. For discrete time field, values in the sort array can be [date-time
16669    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
16670    /// the values can be the month or day names (case insensitive) or their 3-letter initials
16671    /// (e.g., `"Mon"`, `"Tue"`).
16672    /// - `null` indicating no sort.
16673    ///
16674    /// __Default value:__ `"ascending"`
16675    ///
16676    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
16677    ///
16678    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
16679    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16680    #[builder(default)]
16681    pub sort: RemovableValue<SortUnion>,
16682    /// Type of stacking offset if the field should be stacked. `stack` is only applicable for
16683    /// `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of
16684    /// `y` can be used to customize stacking for a vertical bar chart.
16685    ///
16686    /// `stack` can be one of the following values:
16687    /// - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for
16688    /// creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and
16689    /// [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).
16690    /// - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar
16691    /// and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie
16692    /// charts [with percentage
16693    /// tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>
16694    /// -`"center"` - stacking with center baseline (for
16695    /// [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).
16696    /// - `null` or `false` - No-stacking. This will produce layered
16697    /// [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area
16698    /// chart.
16699    ///
16700    /// __Default value:__ `zero` for plots with all of the following conditions are true: (1)
16701    /// the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a
16702    /// linear scale; (3) At least one of non-position channels mapped to an unaggregated field
16703    /// that is different from x and y. Otherwise, `null` by default.
16704    ///
16705    /// __See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.
16706    #[serde(skip_serializing_if = "Option::is_none")]
16707    #[builder(default)]
16708    pub stack: Option<Stack>,
16709    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
16710    /// temporal field that gets casted as
16711    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
16712    ///
16713    /// __Default value:__ `undefined` (None)
16714    ///
16715    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
16716    /// documentation.
16717    #[serde(skip_serializing_if = "Option::is_none")]
16718    #[builder(default)]
16719    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
16720    /// A title for the field. If `null`, the title will be removed.
16721    ///
16722    /// __Default value:__  derived from the field's name and transformation function
16723    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
16724    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
16725    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
16726    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
16727    /// name.
16728    ///
16729    /// __Notes__:
16730    ///
16731    /// 1) You can customize the default field title format by providing the
16732    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
16733    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
16734    /// [`fieldTitle` function via the `compile` function's
16735    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
16736    ///
16737    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
16738    /// axis/header/legend title will be used.
16739    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16740    #[builder(default)]
16741    pub title: RemovableValue<LegendText>,
16742    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
16743    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
16744    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
16745    ///
16746    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
16747    /// is required for a field if: (1) the field is not nominal and the field encoding has no
16748    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
16749    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
16750    /// or `timeUnit`.
16751    ///
16752    /// __Default value:__
16753    ///
16754    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
16755    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
16756    /// following criteria:
16757    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
16758    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
16759    /// `longitude` channel or (3) if the specified scale type is [a quantitative
16760    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
16761    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
16762    /// the specified scale type is a time or utc scale
16763    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
16764    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
16765    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
16766    /// `order`.
16767    ///
16768    /// 2) For a constant value in data domain (`datum`):
16769    /// - `"quantitative"` if the datum is a number
16770    /// - `"nominal"` if the datum is a string
16771    /// - `"temporal"` if the datum is [a date time
16772    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
16773    ///
16774    /// __Note:__
16775    /// - Data `type` describes the semantics of the data rather than the primitive data types
16776    /// (number, string, etc.). The same primitive data type can have different types of
16777    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
16778    /// data.
16779    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
16780    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
16781    /// `1552199579097`).
16782    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
16783    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
16784    /// (for using an ordinal bin
16785    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
16786    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
16787    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
16788    /// [`"ordinal"` (for using an ordinal
16789    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
16790    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
16791    /// the `type` property refers to the post-aggregation data type. For example, we can
16792    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
16793    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
16794    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
16795    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
16796    ///
16797    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
16798    #[serde(rename = "type")]
16799    #[serde(skip_serializing_if = "Option::is_none")]
16800    #[builder(default)]
16801    pub position_def_type: Option<Type>,
16802    /// A constant value in data domain.
16803    #[serde(skip_serializing_if = "Option::is_none")]
16804    #[builder(default)]
16805    pub datum: Option<PrimitiveValue>,
16806    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
16807    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
16808    /// between `0` to `1` for opacity).
16809    #[serde(skip_serializing_if = "Option::is_none")]
16810    #[builder(default)]
16811    pub value: Option<Latitude2Value>,
16812}
16813
16814/// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
16815/// `"rule"`.
16816///
16817/// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
16818/// and  `"rule"`.
16819///
16820/// The inner radius in pixels of arc marks.
16821///
16822/// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
16823/// values proceed clockwise.
16824///
16825/// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
16826///
16827/// The `value` of this channel can be a number or a string `"width"` for the width of the
16828/// plot.
16829///
16830/// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
16831///
16832/// The `value` of this channel can be a number or a string `"height"` for the height of the
16833/// plot.
16834///
16835/// A field definition of a secondary channel that shares a scale with another primary
16836/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
16837///
16838/// Definition object for a constant value (primitive value or gradient definition) of an
16839/// encoding channel.
16840#[derive(Debug, Clone, Serialize, Deserialize)]
16841#[serde(rename_all = "camelCase")]
16842#[derive(Default, Builder)]
16843#[builder(setter(into, strip_option))]
16844pub struct Y2Class {
16845    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
16846    /// `"max"`, `"count"`).
16847    ///
16848    /// __Default value:__ `undefined` (None)
16849    ///
16850    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
16851    /// documentation.
16852    #[serde(skip_serializing_if = "Option::is_none")]
16853    #[builder(default)]
16854    pub aggregate: Option<Aggregate>,
16855    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
16856    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
16857    /// middle of the band if set to `0.5`.
16858    #[serde(skip_serializing_if = "Option::is_none")]
16859    #[builder(default)]
16860    pub band_position: Option<f64>,
16861    /// A flag for binning a `quantitative` field, [an object defining binning
16862    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
16863    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
16864    /// (`"binned"`).
16865    ///
16866    /// - If `true`, default [binning
16867    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
16868    /// applied.
16869    ///
16870    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
16871    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
16872    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
16873    /// the axis ticks based on the bin step, you can also set the axis's
16874    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
16875    ///
16876    /// __Default value:__ `false`
16877    ///
16878    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
16879    #[serde(skip_serializing_if = "Option::is_none")]
16880    #[builder(default)]
16881    pub bin: Option<serde_json::Value>,
16882    /// __Required.__ A string defining the name of the field from which to pull a data value or
16883    /// an object defining iterated values from the
16884    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
16885    ///
16886    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
16887    ///
16888    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
16889    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
16890    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
16891    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
16892    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
16893    /// required if `aggregate` is `count`.
16894    #[serde(skip_serializing_if = "Option::is_none")]
16895    #[builder(default)]
16896    pub field: Option<Field>,
16897    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
16898    /// temporal field that gets casted as
16899    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
16900    ///
16901    /// __Default value:__ `undefined` (None)
16902    ///
16903    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
16904    /// documentation.
16905    #[serde(skip_serializing_if = "Option::is_none")]
16906    #[builder(default)]
16907    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
16908    /// A title for the field. If `null`, the title will be removed.
16909    ///
16910    /// __Default value:__  derived from the field's name and transformation function
16911    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
16912    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
16913    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
16914    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
16915    /// name.
16916    ///
16917    /// __Notes__:
16918    ///
16919    /// 1) You can customize the default field title format by providing the
16920    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
16921    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
16922    /// [`fieldTitle` function via the `compile` function's
16923    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
16924    ///
16925    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
16926    /// axis/header/legend title will be used.
16927    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
16928    #[builder(default)]
16929    pub title: RemovableValue<LegendText>,
16930    /// A constant value in data domain.
16931    #[serde(skip_serializing_if = "Option::is_none")]
16932    #[builder(default)]
16933    pub datum: Option<PrimitiveValue>,
16934    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
16935    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
16936    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
16937    ///
16938    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
16939    /// is required for a field if: (1) the field is not nominal and the field encoding has no
16940    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
16941    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
16942    /// or `timeUnit`.
16943    ///
16944    /// __Default value:__
16945    ///
16946    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
16947    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
16948    /// following criteria:
16949    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
16950    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
16951    /// `longitude` channel or (3) if the specified scale type is [a quantitative
16952    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
16953    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
16954    /// the specified scale type is a time or utc scale
16955    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
16956    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
16957    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
16958    /// `order`.
16959    ///
16960    /// 2) For a constant value in data domain (`datum`):
16961    /// - `"quantitative"` if the datum is a number
16962    /// - `"nominal"` if the datum is a string
16963    /// - `"temporal"` if the datum is [a date time
16964    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
16965    ///
16966    /// __Note:__
16967    /// - Data `type` describes the semantics of the data rather than the primitive data types
16968    /// (number, string, etc.). The same primitive data type can have different types of
16969    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
16970    /// data.
16971    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
16972    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
16973    /// `1552199579097`).
16974    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
16975    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
16976    /// (for using an ordinal bin
16977    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
16978    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
16979    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
16980    /// [`"ordinal"` (for using an ordinal
16981    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
16982    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
16983    /// the `type` property refers to the post-aggregation data type. For example, we can
16984    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
16985    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
16986    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
16987    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
16988    ///
16989    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
16990    #[serde(rename = "type")]
16991    #[serde(skip_serializing_if = "Option::is_none")]
16992    #[builder(default)]
16993    pub position2_def_type: Option<Type>,
16994    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
16995    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
16996    /// between `0` to `1` for opacity).
16997    #[serde(skip_serializing_if = "Option::is_none")]
16998    #[builder(default)]
16999    pub value: Option<Latitude2Value>,
17000}
17001
17002/// Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
17003///
17004/// Secondary error value of x coordinates for error specified `"errorbar"` and
17005/// `"errorband"`.
17006///
17007/// Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
17008///
17009/// Secondary error value of y coordinates for error specified `"errorbar"` and
17010/// `"errorband"`.
17011///
17012/// A field definition of a secondary channel that shares a scale with another primary
17013/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
17014///
17015/// Definition object for a constant value (primitive value or gradient definition) of an
17016/// encoding channel.
17017#[derive(Debug, Clone, Serialize, Deserialize)]
17018#[serde(rename_all = "camelCase")]
17019#[derive(Default, Builder)]
17020#[builder(setter(into, strip_option))]
17021pub struct YErrorClass {
17022    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
17023    /// `"max"`, `"count"`).
17024    ///
17025    /// __Default value:__ `undefined` (None)
17026    ///
17027    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
17028    /// documentation.
17029    #[serde(skip_serializing_if = "Option::is_none")]
17030    #[builder(default)]
17031    pub aggregate: Option<Aggregate>,
17032    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
17033    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
17034    /// middle of the band if set to `0.5`.
17035    #[serde(skip_serializing_if = "Option::is_none")]
17036    #[builder(default)]
17037    pub band_position: Option<f64>,
17038    /// A flag for binning a `quantitative` field, [an object defining binning
17039    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
17040    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
17041    /// (`"binned"`).
17042    ///
17043    /// - If `true`, default [binning
17044    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
17045    /// applied.
17046    ///
17047    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
17048    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
17049    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
17050    /// the axis ticks based on the bin step, you can also set the axis's
17051    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
17052    ///
17053    /// __Default value:__ `false`
17054    ///
17055    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
17056    #[serde(skip_serializing_if = "Option::is_none")]
17057    #[builder(default)]
17058    pub bin: Option<serde_json::Value>,
17059    /// __Required.__ A string defining the name of the field from which to pull a data value or
17060    /// an object defining iterated values from the
17061    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
17062    ///
17063    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
17064    ///
17065    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
17066    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
17067    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
17068    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
17069    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
17070    /// required if `aggregate` is `count`.
17071    #[serde(skip_serializing_if = "Option::is_none")]
17072    #[builder(default)]
17073    pub field: Option<Field>,
17074    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
17075    /// temporal field that gets casted as
17076    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
17077    ///
17078    /// __Default value:__ `undefined` (None)
17079    ///
17080    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
17081    /// documentation.
17082    #[serde(skip_serializing_if = "Option::is_none")]
17083    #[builder(default)]
17084    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
17085    /// A title for the field. If `null`, the title will be removed.
17086    ///
17087    /// __Default value:__  derived from the field's name and transformation function
17088    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
17089    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
17090    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
17091    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
17092    /// name.
17093    ///
17094    /// __Notes__:
17095    ///
17096    /// 1) You can customize the default field title format by providing the
17097    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
17098    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
17099    /// [`fieldTitle` function via the `compile` function's
17100    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
17101    ///
17102    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
17103    /// axis/header/legend title will be used.
17104    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17105    #[builder(default)]
17106    pub title: RemovableValue<LegendText>,
17107    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
17108    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
17109    /// between `0` to `1` for opacity).
17110    #[serde(skip_serializing_if = "Option::is_none")]
17111    #[builder(default)]
17112    pub value: Option<f64>,
17113}
17114
17115/// Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
17116///
17117/// Secondary error value of x coordinates for error specified `"errorbar"` and
17118/// `"errorband"`.
17119///
17120/// Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
17121///
17122/// Secondary error value of y coordinates for error specified `"errorbar"` and
17123/// `"errorband"`.
17124///
17125/// A field definition of a secondary channel that shares a scale with another primary
17126/// channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.
17127///
17128/// Definition object for a constant value (primitive value or gradient definition) of an
17129/// encoding channel.
17130#[derive(Debug, Clone, Serialize, Deserialize)]
17131#[serde(rename_all = "camelCase")]
17132#[derive(Default, Builder)]
17133#[builder(setter(into, strip_option))]
17134pub struct YError2Class {
17135    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
17136    /// `"max"`, `"count"`).
17137    ///
17138    /// __Default value:__ `undefined` (None)
17139    ///
17140    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
17141    /// documentation.
17142    #[serde(skip_serializing_if = "Option::is_none")]
17143    #[builder(default)]
17144    pub aggregate: Option<Aggregate>,
17145    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
17146    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
17147    /// middle of the band if set to `0.5`.
17148    #[serde(skip_serializing_if = "Option::is_none")]
17149    #[builder(default)]
17150    pub band_position: Option<f64>,
17151    /// A flag for binning a `quantitative` field, [an object defining binning
17152    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
17153    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
17154    /// (`"binned"`).
17155    ///
17156    /// - If `true`, default [binning
17157    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
17158    /// applied.
17159    ///
17160    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
17161    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
17162    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
17163    /// the axis ticks based on the bin step, you can also set the axis's
17164    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
17165    ///
17166    /// __Default value:__ `false`
17167    ///
17168    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
17169    #[serde(skip_serializing_if = "Option::is_none")]
17170    #[builder(default)]
17171    pub bin: Option<serde_json::Value>,
17172    /// __Required.__ A string defining the name of the field from which to pull a data value or
17173    /// an object defining iterated values from the
17174    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
17175    ///
17176    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
17177    ///
17178    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
17179    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
17180    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
17181    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
17182    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
17183    /// required if `aggregate` is `count`.
17184    #[serde(skip_serializing_if = "Option::is_none")]
17185    #[builder(default)]
17186    pub field: Option<Field>,
17187    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
17188    /// temporal field that gets casted as
17189    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
17190    ///
17191    /// __Default value:__ `undefined` (None)
17192    ///
17193    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
17194    /// documentation.
17195    #[serde(skip_serializing_if = "Option::is_none")]
17196    #[builder(default)]
17197    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
17198    /// A title for the field. If `null`, the title will be removed.
17199    ///
17200    /// __Default value:__  derived from the field's name and transformation function
17201    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
17202    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
17203    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
17204    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
17205    /// name.
17206    ///
17207    /// __Notes__:
17208    ///
17209    /// 1) You can customize the default field title format by providing the
17210    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
17211    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
17212    /// [`fieldTitle` function via the `compile` function's
17213    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
17214    ///
17215    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
17216    /// axis/header/legend title will be used.
17217    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17218    #[builder(default)]
17219    pub title: RemovableValue<LegendText>,
17220    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
17221    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
17222    /// between `0` to `1` for opacity).
17223    #[serde(skip_serializing_if = "Option::is_none")]
17224    #[builder(default)]
17225    pub value: Option<f64>,
17226}
17227
17228/// Offset of x-position of the marks
17229///
17230/// Offset of y-position of the marks
17231///
17232/// Definition object for a constant value (primitive value or gradient definition) of an
17233/// encoding channel.
17234#[derive(Debug, Clone, Serialize, Deserialize)]
17235#[serde(rename_all = "camelCase")]
17236#[derive(Default, Builder)]
17237#[builder(setter(into, strip_option))]
17238pub struct YOffsetClass {
17239    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
17240    /// `"max"`, `"count"`).
17241    ///
17242    /// __Default value:__ `undefined` (None)
17243    ///
17244    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
17245    /// documentation.
17246    #[serde(skip_serializing_if = "Option::is_none")]
17247    #[builder(default)]
17248    pub aggregate: Option<Aggregate>,
17249    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
17250    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
17251    /// middle of the band if set to `0.5`.
17252    #[serde(skip_serializing_if = "Option::is_none")]
17253    #[builder(default)]
17254    pub band_position: Option<f64>,
17255    /// A flag for binning a `quantitative` field, [an object defining binning
17256    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
17257    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
17258    /// (`"binned"`).
17259    ///
17260    /// - If `true`, default [binning
17261    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
17262    /// applied.
17263    ///
17264    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
17265    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
17266    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
17267    /// the axis ticks based on the bin step, you can also set the axis's
17268    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
17269    ///
17270    /// __Default value:__ `false`
17271    ///
17272    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
17273    #[serde(skip_serializing_if = "Option::is_none")]
17274    #[builder(default)]
17275    pub bin: Option<AngleBin>,
17276    /// __Required.__ A string defining the name of the field from which to pull a data value or
17277    /// an object defining iterated values from the
17278    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
17279    ///
17280    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
17281    ///
17282    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
17283    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
17284    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
17285    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
17286    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
17287    /// required if `aggregate` is `count`.
17288    #[serde(skip_serializing_if = "Option::is_none")]
17289    #[builder(default)]
17290    pub field: Option<Field>,
17291    /// An object defining properties of the channel's scale, which is the function that
17292    /// transforms values in the data domain (numbers, dates, strings, etc) to visual values
17293    /// (pixels, colors, sizes) of the encoding channels.
17294    ///
17295    /// If `null`, the scale will be [disabled and the data value will be directly
17296    /// encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).
17297    ///
17298    /// __Default value:__ If undefined, default [scale
17299    /// properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.
17300    ///
17301    /// __See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.
17302    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17303    #[builder(default)]
17304    pub scale: RemovableValue<Scale>,
17305    /// Sort order for the encoded field.
17306    ///
17307    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
17308    /// `"descending"`.
17309    ///
17310    /// For discrete fields, `sort` can be one of the following:
17311    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
17312    /// JavaScript.
17313    /// - [A string indicating an encoding channel name to sort
17314    /// by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or
17315    /// `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by
17316    /// x-field, descending). This channel string is short-form of [a sort-by-encoding
17317    /// definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For
17318    /// example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order":
17319    /// "descending"}`.
17320    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
17321    /// for sorting by another field.
17322    /// - [An array specifying the field values in preferred
17323    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
17324    /// sort order will obey the values in the array, followed by any unspecified values in their
17325    /// original order. For discrete time field, values in the sort array can be [date-time
17326    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
17327    /// the values can be the month or day names (case insensitive) or their 3-letter initials
17328    /// (e.g., `"Mon"`, `"Tue"`).
17329    /// - `null` indicating no sort.
17330    ///
17331    /// __Default value:__ `"ascending"`
17332    ///
17333    /// __Note:__ `null` and sorting by another channel is not supported for `row` and `column`.
17334    ///
17335    /// __See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.
17336    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17337    #[builder(default)]
17338    pub sort: RemovableValue<SortUnion>,
17339    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
17340    /// temporal field that gets casted as
17341    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
17342    ///
17343    /// __Default value:__ `undefined` (None)
17344    ///
17345    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
17346    /// documentation.
17347    #[serde(skip_serializing_if = "Option::is_none")]
17348    #[builder(default)]
17349    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
17350    /// A title for the field. If `null`, the title will be removed.
17351    ///
17352    /// __Default value:__  derived from the field's name and transformation function
17353    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
17354    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
17355    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
17356    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
17357    /// name.
17358    ///
17359    /// __Notes__:
17360    ///
17361    /// 1) You can customize the default field title format by providing the
17362    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
17363    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
17364    /// [`fieldTitle` function via the `compile` function's
17365    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
17366    ///
17367    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
17368    /// axis/header/legend title will be used.
17369    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17370    #[builder(default)]
17371    pub title: RemovableValue<LegendText>,
17372    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
17373    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
17374    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
17375    ///
17376    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
17377    /// is required for a field if: (1) the field is not nominal and the field encoding has no
17378    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
17379    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
17380    /// or `timeUnit`.
17381    ///
17382    /// __Default value:__
17383    ///
17384    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
17385    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
17386    /// following criteria:
17387    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
17388    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
17389    /// `longitude` channel or (3) if the specified scale type is [a quantitative
17390    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
17391    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
17392    /// the specified scale type is a time or utc scale
17393    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
17394    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
17395    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
17396    /// `order`.
17397    ///
17398    /// 2) For a constant value in data domain (`datum`):
17399    /// - `"quantitative"` if the datum is a number
17400    /// - `"nominal"` if the datum is a string
17401    /// - `"temporal"` if the datum is [a date time
17402    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
17403    ///
17404    /// __Note:__
17405    /// - Data `type` describes the semantics of the data rather than the primitive data types
17406    /// (number, string, etc.). The same primitive data type can have different types of
17407    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
17408    /// data.
17409    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
17410    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
17411    /// `1552199579097`).
17412    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
17413    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
17414    /// (for using an ordinal bin
17415    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
17416    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
17417    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
17418    /// [`"ordinal"` (for using an ordinal
17419    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
17420    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
17421    /// the `type` property refers to the post-aggregation data type. For example, we can
17422    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
17423    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
17424    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
17425    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
17426    ///
17427    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
17428    #[serde(rename = "type")]
17429    #[serde(skip_serializing_if = "Option::is_none")]
17430    #[builder(default)]
17431    pub offset_def_type: Option<Type>,
17432    /// A constant value in data domain.
17433    #[serde(skip_serializing_if = "Option::is_none")]
17434    #[builder(default)]
17435    pub datum: Option<PrimitiveValue>,
17436    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
17437    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
17438    /// between `0` to `1` for opacity).
17439    #[serde(skip_serializing_if = "Option::is_none")]
17440    #[builder(default)]
17441    pub value: Option<f64>,
17442}
17443
17444/// Definition for how to facet the data. One of: 1) [a field definition for faceting the
17445/// plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An
17446/// object that maps `row` and `column` channels to their field
17447/// definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)
17448///
17449/// A field definition for the horizontal facet of trellis plots.
17450///
17451/// A field definition for the vertical facet of trellis plots.
17452#[derive(Debug, Clone, Serialize, Deserialize)]
17453#[serde(rename_all = "camelCase")]
17454#[derive(Default, Builder)]
17455#[builder(setter(into, strip_option))]
17456pub struct Facet {
17457    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
17458    /// `"max"`, `"count"`).
17459    ///
17460    /// __Default value:__ `undefined` (None)
17461    ///
17462    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
17463    /// documentation.
17464    #[serde(skip_serializing_if = "Option::is_none")]
17465    #[builder(default)]
17466    pub aggregate: Option<Aggregate>,
17467    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
17468    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
17469    /// middle of the band if set to `0.5`.
17470    #[serde(skip_serializing_if = "Option::is_none")]
17471    #[builder(default)]
17472    pub band_position: Option<f64>,
17473    /// A flag for binning a `quantitative` field, [an object defining binning
17474    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
17475    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
17476    /// (`"binned"`).
17477    ///
17478    /// - If `true`, default [binning
17479    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
17480    /// applied.
17481    ///
17482    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
17483    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
17484    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
17485    /// the axis ticks based on the bin step, you can also set the axis's
17486    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
17487    ///
17488    /// __Default value:__ `false`
17489    ///
17490    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
17491    #[serde(skip_serializing_if = "Option::is_none")]
17492    #[builder(default)]
17493    pub bin: Option<AngleBin>,
17494    /// __Required.__ A string defining the name of the field from which to pull a data value or
17495    /// an object defining iterated values from the
17496    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
17497    ///
17498    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
17499    ///
17500    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
17501    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
17502    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
17503    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
17504    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
17505    /// required if `aggregate` is `count`.
17506    #[serde(skip_serializing_if = "Option::is_none")]
17507    #[builder(default)]
17508    pub field: Option<Field>,
17509    /// An object defining properties of a facet's header.
17510    #[serde(skip_serializing_if = "Option::is_none")]
17511    #[builder(default)]
17512    pub header: Option<Header>,
17513    /// Sort order for the encoded field.
17514    ///
17515    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
17516    /// `"descending"`.
17517    ///
17518    /// For discrete fields, `sort` can be one of the following:
17519    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
17520    /// JavaScript.
17521    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
17522    /// for sorting by another field.
17523    /// - [An array specifying the field values in preferred
17524    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
17525    /// sort order will obey the values in the array, followed by any unspecified values in their
17526    /// original order. For discrete time field, values in the sort array can be [date-time
17527    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
17528    /// the values can be the month or day names (case insensitive) or their 3-letter initials
17529    /// (e.g., `"Mon"`, `"Tue"`).
17530    /// - `null` indicating no sort.
17531    ///
17532    /// __Default value:__ `"ascending"`
17533    ///
17534    /// __Note:__ `null` is not supported for `row` and `column`.
17535    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17536    #[builder(default)]
17537    pub sort: RemovableValue<SortArray>,
17538    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
17539    /// temporal field that gets casted as
17540    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
17541    ///
17542    /// __Default value:__ `undefined` (None)
17543    ///
17544    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
17545    /// documentation.
17546    #[serde(skip_serializing_if = "Option::is_none")]
17547    #[builder(default)]
17548    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
17549    /// A title for the field. If `null`, the title will be removed.
17550    ///
17551    /// __Default value:__  derived from the field's name and transformation function
17552    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
17553    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
17554    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
17555    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
17556    /// name.
17557    ///
17558    /// __Notes__:
17559    ///
17560    /// 1) You can customize the default field title format by providing the
17561    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
17562    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
17563    /// [`fieldTitle` function via the `compile` function's
17564    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
17565    ///
17566    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
17567    /// axis/header/legend title will be used.
17568    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17569    #[builder(default)]
17570    pub title: RemovableValue<LegendText>,
17571    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
17572    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
17573    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
17574    ///
17575    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
17576    /// is required for a field if: (1) the field is not nominal and the field encoding has no
17577    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
17578    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
17579    /// or `timeUnit`.
17580    ///
17581    /// __Default value:__
17582    ///
17583    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
17584    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
17585    /// following criteria:
17586    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
17587    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
17588    /// `longitude` channel or (3) if the specified scale type is [a quantitative
17589    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
17590    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
17591    /// the specified scale type is a time or utc scale
17592    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
17593    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
17594    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
17595    /// `order`.
17596    ///
17597    /// 2) For a constant value in data domain (`datum`):
17598    /// - `"quantitative"` if the datum is a number
17599    /// - `"nominal"` if the datum is a string
17600    /// - `"temporal"` if the datum is [a date time
17601    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
17602    ///
17603    /// __Note:__
17604    /// - Data `type` describes the semantics of the data rather than the primitive data types
17605    /// (number, string, etc.). The same primitive data type can have different types of
17606    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
17607    /// data.
17608    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
17609    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
17610    /// `1552199579097`).
17611    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
17612    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
17613    /// (for using an ordinal bin
17614    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
17615    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
17616    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
17617    /// [`"ordinal"` (for using an ordinal
17618    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
17619    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
17620    /// the `type` property refers to the post-aggregation data type. For example, we can
17621    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
17622    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
17623    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
17624    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
17625    ///
17626    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
17627    #[serde(rename = "type")]
17628    #[serde(skip_serializing_if = "Option::is_none")]
17629    #[builder(default)]
17630    pub facet_type: Option<StandardType>,
17631    /// A field definition for the horizontal facet of trellis plots.
17632    #[serde(skip_serializing_if = "Option::is_none")]
17633    #[builder(default)]
17634    pub column: Option<FacetFieldDef>,
17635    /// A field definition for the vertical facet of trellis plots.
17636    #[serde(skip_serializing_if = "Option::is_none")]
17637    #[builder(default)]
17638    pub row: Option<FacetFieldDef>,
17639}
17640
17641/// A field definition for the horizontal facet of trellis plots.
17642///
17643/// A field definition for the vertical facet of trellis plots.
17644#[derive(Debug, Clone, Serialize, Deserialize)]
17645#[serde(rename_all = "camelCase")]
17646#[derive(Default, Builder)]
17647#[builder(setter(into, strip_option))]
17648pub struct FacetFieldDef {
17649    /// Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`,
17650    /// `"max"`, `"count"`).
17651    ///
17652    /// __Default value:__ `undefined` (None)
17653    ///
17654    /// __See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html)
17655    /// documentation.
17656    #[serde(skip_serializing_if = "Option::is_none")]
17657    #[builder(default)]
17658    pub aggregate: Option<Aggregate>,
17659    /// Relative position on a band of a stacked, binned, time unit, or band scale. For example,
17660    /// the marks will be positioned at the beginning of the band if set to `0`, and at the
17661    /// middle of the band if set to `0.5`.
17662    #[serde(skip_serializing_if = "Option::is_none")]
17663    #[builder(default)]
17664    pub band_position: Option<f64>,
17665    /// A flag for binning a `quantitative` field, [an object defining binning
17666    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating
17667    /// that the data for `x` or `y` channel are binned before they are imported into Vega-Lite
17668    /// (`"binned"`).
17669    ///
17670    /// - If `true`, default [binning
17671    /// parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be
17672    /// applied.
17673    ///
17674    /// - If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already
17675    /// binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or
17676    /// `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust
17677    /// the axis ticks based on the bin step, you can also set the axis's
17678    /// [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.
17679    ///
17680    /// __Default value:__ `false`
17681    ///
17682    /// __See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.
17683    #[serde(skip_serializing_if = "Option::is_none")]
17684    #[builder(default)]
17685    pub bin: Option<AngleBin>,
17686    /// __Required.__ A string defining the name of the field from which to pull a data value or
17687    /// an object defining iterated values from the
17688    /// [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.
17689    ///
17690    /// __See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.
17691    ///
17692    /// __Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects
17693    /// (e.g., `"field": "foo.bar"` and `"field": "foo['bar']"`). If field names contain dots or
17694    /// brackets but are not nested, you can use `\\` to escape dots and brackets (e.g.,
17695    /// `"a\\.b"` and `"a\\[0\\]"`). See more details about escaping in the [field
17696    /// documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not
17697    /// required if `aggregate` is `count`.
17698    #[serde(skip_serializing_if = "Option::is_none")]
17699    #[builder(default)]
17700    pub field: Option<Field>,
17701    /// An object defining properties of a facet's header.
17702    #[serde(skip_serializing_if = "Option::is_none")]
17703    #[builder(default)]
17704    pub header: Option<Header>,
17705    /// Sort order for the encoded field.
17706    ///
17707    /// For continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or
17708    /// `"descending"`.
17709    ///
17710    /// For discrete fields, `sort` can be one of the following:
17711    /// - `"ascending"` or `"descending"` -- for sorting by the values' natural order in
17712    /// JavaScript.
17713    /// - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field)
17714    /// for sorting by another field.
17715    /// - [An array specifying the field values in preferred
17716    /// order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the
17717    /// sort order will obey the values in the array, followed by any unspecified values in their
17718    /// original order. For discrete time field, values in the sort array can be [date-time
17719    /// definition objects](struct.DateTime.html). In addition, for time units `"month"` and `"day"`,
17720    /// the values can be the month or day names (case insensitive) or their 3-letter initials
17721    /// (e.g., `"Mon"`, `"Tue"`).
17722    /// - `null` indicating no sort.
17723    ///
17724    /// __Default value:__ `"ascending"`
17725    ///
17726    /// __Note:__ `null` is not supported for `row` and `column`.
17727    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17728    #[builder(default)]
17729    pub sort: RemovableValue<SortArray>,
17730    /// Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a
17731    /// temporal field that gets casted as
17732    /// ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).
17733    ///
17734    /// __Default value:__ `undefined` (None)
17735    ///
17736    /// __See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html)
17737    /// documentation.
17738    #[serde(skip_serializing_if = "Option::is_none")]
17739    #[builder(default)]
17740    pub time_unit: Option<LogicalNotPredicateTimeUnit>,
17741    /// A title for the field. If `null`, the title will be removed.
17742    ///
17743    /// __Default value:__  derived from the field's name and transformation function
17744    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
17745    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
17746    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
17747    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
17748    /// name.
17749    ///
17750    /// __Notes__:
17751    ///
17752    /// 1) You can customize the default field title format by providing the
17753    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
17754    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
17755    /// [`fieldTitle` function via the `compile` function's
17756    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
17757    ///
17758    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
17759    /// axis/header/legend title will be used.
17760    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17761    #[builder(default)]
17762    pub title: RemovableValue<LegendText>,
17763    /// The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for
17764    /// the encoded field or constant value (`datum`). It can also be a `"geojson"` type for
17765    /// encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).
17766    ///
17767    /// Vega-Lite automatically infers data types in many cases as discussed below. However, type
17768    /// is required for a field if: (1) the field is not nominal and the field encoding has no
17769    /// specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort`
17770    /// order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin`
17771    /// or `timeUnit`.
17772    ///
17773    /// __Default value:__
17774    ///
17775    /// 1) For a data `field`, `"nominal"` is the default data type unless the field encoding has
17776    /// `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the
17777    /// following criteria:
17778    /// - `"quantitative"` is the default type if (1) the encoded field contains `bin` or
17779    /// `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or
17780    /// `longitude` channel or (3) if the specified scale type is [a quantitative
17781    /// scale](https://vega.github.io/vega-lite/docs/scale.html#type).
17782    /// - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2)
17783    /// the specified scale type is a time or utc scale
17784    /// - `"ordinal"` is the default type if (1) the encoded field contains a [custom `sort`
17785    /// order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2)
17786    /// the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is
17787    /// `order`.
17788    ///
17789    /// 2) For a constant value in data domain (`datum`):
17790    /// - `"quantitative"` if the datum is a number
17791    /// - `"nominal"` if the datum is a string
17792    /// - `"temporal"` if the datum is [a date time
17793    /// object](https://vega.github.io/vega-lite/docs/datetime.html)
17794    ///
17795    /// __Note:__
17796    /// - Data `type` describes the semantics of the data rather than the primitive data types
17797    /// (number, string, etc.). The same primitive data type can have different types of
17798    /// measurement. For example, numeric data can represent quantitative, ordinal, or nominal
17799    /// data.
17800    /// - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07
17801    /// 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g.,
17802    /// `1552199579097`).
17803    /// - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type`
17804    /// property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"`
17805    /// (for using an ordinal bin
17806    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
17807    /// - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the
17808    /// `type` property can be either `"temporal"` (default, for using a temporal scale) or
17809    /// [`"ordinal"` (for using an ordinal
17810    /// scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).
17811    /// - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html),
17812    /// the `type` property refers to the post-aggregation data type. For example, we can
17813    /// calculate count `distinct` of a categorical field `"cat"` using `{"aggregate":
17814    /// "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`.
17815    /// - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they
17816    /// must have exactly the same type as their primary channels (e.g., `x`, `y`).
17817    ///
17818    /// __See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.
17819    #[serde(rename = "type")]
17820    #[serde(skip_serializing_if = "Option::is_none")]
17821    #[builder(default)]
17822    pub facet_field_def_type: Option<StandardType>,
17823}
17824
17825#[derive(Debug, Clone, Serialize, Deserialize)]
17826#[serde(untagged)]
17827#[derive(From)]
17828pub enum SpecHeight {
17829    Double(f64),
17830    Enum(HeightEnum),
17831    Step(Box<Step>),
17832}
17833
17834#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
17835#[builder(setter(into, strip_option))]
17836pub struct Step {
17837    /// Whether to apply the step to position scale or offset scale when there are both `x` and
17838    /// `xOffset` or both `y` and `yOffset` encodings.
17839    #[serde(rename = "for")]
17840    #[serde(skip_serializing_if = "Option::is_none")]
17841    #[builder(default)]
17842    pub step_for: Option<StepFor>,
17843    /// The size (width/height) per discrete step.
17844    #[serde(skip_serializing_if = "Option::is_none")]
17845    #[builder(default)]
17846    pub step: Option<f64>,
17847}
17848
17849/// Whether to apply the step to position scale or offset scale when there are both `x` and
17850/// `xOffset` or both `y` and `yOffset` encodings.
17851#[derive(Debug, Clone, Serialize, Deserialize)]
17852#[serde(rename_all = "snake_case")]
17853pub enum StepFor {
17854    Offset,
17855    Position,
17856}
17857
17858#[derive(Debug, Clone, Serialize, Deserialize)]
17859#[serde(rename_all = "snake_case")]
17860pub enum HeightEnum {
17861    Container,
17862}
17863
17864/// A full layered plot specification, which may contains `encoding` and `projection`
17865/// properties that will be applied to underlying unit (single-view) specifications.
17866///
17867/// A unit specification, which can contain either [primitive marks or composite
17868/// marks](https://vega.github.io/vega-lite/docs/mark.html#types).
17869///
17870/// Base interface for a unit (single-view) specification.
17871#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
17872#[builder(setter(into, strip_option))]
17873pub struct LayerSpec {
17874    /// An object describing the data source. Set to `null` to ignore the parent's data source.
17875    /// If no data is set, it is derived from the parent.
17876    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
17877    #[builder(default)]
17878    pub data: RemovableValue<UrlData>,
17879    /// Description of this mark for commenting purpose.
17880    #[serde(skip_serializing_if = "Option::is_none")]
17881    #[builder(default)]
17882    pub description: Option<String>,
17883    /// A shared key-value mapping between encoding channels and definition of fields in the
17884    /// underlying layers.
17885    ///
17886    /// A key-value mapping between encoding channels and definition of fields.
17887    #[serde(skip_serializing_if = "Option::is_none")]
17888    #[builder(default)]
17889    pub encoding: Option<LayerEncoding>,
17890    /// The height of a visualization.
17891    ///
17892    /// - For a plot with a continuous y-field, height should be a number.
17893    /// - For a plot with either a discrete y-field or no y-field, height can be either a number
17894    /// indicating a fixed height or an object in the form of `{step: number}` defining the
17895    /// height per discrete step. (No y-field is equivalent to having one discrete step.)
17896    /// - To enable responsive sizing on height, it should be set to `"container"`.
17897    ///
17898    /// __Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous
17899    /// y-field and `config.view.discreteHeight` otherwise.
17900    ///
17901    /// __Note:__ For plots with [`row` and `column`
17902    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
17903    /// height of a single view and the `"container"` option cannot be used.
17904    ///
17905    /// __See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.
17906    #[serde(skip_serializing_if = "Option::is_none")]
17907    #[builder(default)]
17908    pub height: Option<SpecHeight>,
17909    /// Layer or single view specifications to be layered.
17910    ///
17911    /// __Note__: Specifications inside `layer` cannot use `row` and `column` channels as
17912    /// layering facet specifications is not allowed. Instead, use the [facet
17913    /// operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a
17914    /// facet.
17915    #[serde(skip_serializing_if = "Option::is_none")]
17916    #[builder(default)]
17917    pub layer: Option<Vec<LayerSpec>>,
17918    /// Name of the visualization for later reference.
17919    #[serde(skip_serializing_if = "Option::is_none")]
17920    #[builder(default)]
17921    pub name: Option<String>,
17922    /// An object defining properties of the geographic projection shared by underlying layers.
17923    ///
17924    /// An object defining properties of geographic projection, which will be applied to `shape`
17925    /// path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other marks.
17926    #[serde(skip_serializing_if = "Option::is_none")]
17927    #[builder(default)]
17928    pub projection: Option<Box<Projection>>,
17929    /// Scale, axis, and legend resolutions for view composition specifications.
17930    #[serde(skip_serializing_if = "Option::is_none")]
17931    #[builder(default)]
17932    pub resolve: Option<Box<Resolve>>,
17933    /// Title for the plot.
17934    #[serde(skip_serializing_if = "Option::is_none")]
17935    #[builder(default)]
17936    pub title: Option<TitleUnion>,
17937    /// An array of data transformations such as filter and new field calculation.
17938    #[serde(skip_serializing_if = "Option::is_none")]
17939    #[builder(default)]
17940    pub transform: Option<Vec<Transform>>,
17941    /// An object defining the view background's fill and stroke.
17942    ///
17943    /// __Default value:__ none (transparent)
17944    #[serde(skip_serializing_if = "Option::is_none")]
17945    #[builder(default)]
17946    pub view: Option<Box<ViewBackground>>,
17947    /// The width of a visualization.
17948    ///
17949    /// - For a plot with a continuous x-field, width should be a number.
17950    /// - For a plot with either a discrete x-field or no x-field, width can be either a number
17951    /// indicating a fixed width or an object in the form of `{step: number}` defining the width
17952    /// per discrete step. (No x-field is equivalent to having one discrete step.)
17953    /// - To enable responsive sizing on width, it should be set to `"container"`.
17954    ///
17955    /// __Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous
17956    /// x-field and `config.view.discreteWidth` otherwise.
17957    ///
17958    /// __Note:__ For plots with [`row` and `column`
17959    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
17960    /// width of a single view and the `"container"` option cannot be used.
17961    ///
17962    /// __See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.
17963    #[serde(skip_serializing_if = "Option::is_none")]
17964    #[builder(default)]
17965    pub width: Option<SpecHeight>,
17966    /// A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
17967    /// `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark
17968    /// definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
17969    #[serde(skip_serializing_if = "Option::is_none")]
17970    #[builder(default)]
17971    pub mark: Option<AnyMark>,
17972    /// An array of parameters that may either be simple variables, or more complex selections
17973    /// that map user input to data queries.
17974    #[serde(skip_serializing_if = "Option::is_none")]
17975    #[builder(default)]
17976    pub params: Option<Vec<SelectionParameter>>,
17977}
17978
17979/// A shared key-value mapping between encoding channels and definition of fields in the
17980/// underlying layers.
17981///
17982/// A key-value mapping between encoding channels and definition of fields.
17983#[derive(Debug, Clone, Serialize, Deserialize)]
17984#[serde(rename_all = "camelCase")]
17985#[derive(Default, Builder)]
17986#[builder(setter(into, strip_option))]
17987pub struct LayerEncoding {
17988    /// Rotation angle of point and text marks.
17989    #[serde(skip_serializing_if = "Option::is_none")]
17990    #[builder(default)]
17991    pub angle: Option<AngleClass>,
17992    /// Color of the marks – either fill or stroke color based on  the `filled` property of mark
17993    /// definition. By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
17994    /// `"text"`, `"trail"`, `"circle"`, and `"square"` / stroke color for `"line"` and
17995    /// `"point"`.
17996    ///
17997    /// __Default value:__ If undefined, the default color depends on [mark
17998    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
17999    /// property.
18000    ///
18001    /// _Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please
18002    /// use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher
18003    /// precedence than `color`, thus may override the `color` encoding if conflicting encodings
18004    /// are specified. 2) See the scale documentation for more information about customizing
18005    /// [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).
18006    #[serde(skip_serializing_if = "Option::is_none")]
18007    #[builder(default)]
18008    pub color: Option<ColorClass>,
18009    /// A text description of this mark for ARIA accessibility (SVG output only). For SVG output
18010    /// the `"aria-label"` attribute will be set to this description.
18011    #[serde(skip_serializing_if = "Option::is_none")]
18012    #[builder(default)]
18013    pub description: Option<DescriptionClass>,
18014    /// Additional levels of detail for grouping data in aggregate views and in line, trail, and
18015    /// area marks without mapping data to a specific visual channel.
18016    #[serde(skip_serializing_if = "Option::is_none")]
18017    #[builder(default)]
18018    pub detail: Option<Detail>,
18019    /// Fill color of the marks. __Default value:__ If undefined, the default color depends on
18020    /// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
18021    /// property.
18022    ///
18023    /// _Note:_ The `fill` encoding has higher precedence than `color`, thus may override the
18024    /// `color` encoding if conflicting encodings are specified.
18025    #[serde(skip_serializing_if = "Option::is_none")]
18026    #[builder(default)]
18027    pub fill: Option<FillClass>,
18028    /// Fill opacity of the marks.
18029    ///
18030    /// __Default value:__ If undefined, the default opacity depends on [mark
18031    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
18032    /// property.
18033    #[serde(skip_serializing_if = "Option::is_none")]
18034    #[builder(default)]
18035    pub fill_opacity: Option<FillOpacityClass>,
18036    /// A URL to load upon mouse click.
18037    #[serde(skip_serializing_if = "Option::is_none")]
18038    #[builder(default)]
18039    pub href: Option<HrefClass>,
18040    /// A data field to use as a unique key for data binding. When a visualization’s data is
18041    /// updated, the key value will be used to match data elements to existing mark instances.
18042    /// Use a key channel to enable object constancy for transitions over dynamic data.
18043    #[serde(skip_serializing_if = "Option::is_none")]
18044    #[builder(default)]
18045    pub key: Option<KeyClass>,
18046    /// Latitude position of geographically projected marks.
18047    #[serde(skip_serializing_if = "Option::is_none")]
18048    #[builder(default)]
18049    pub latitude: Option<LatitudeClass>,
18050    /// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
18051    /// `"rule"`.
18052    #[serde(skip_serializing_if = "Option::is_none")]
18053    #[builder(default)]
18054    pub latitude2: Option<Latitude2Class>,
18055    /// Longitude position of geographically projected marks.
18056    #[serde(skip_serializing_if = "Option::is_none")]
18057    #[builder(default)]
18058    pub longitude: Option<LongitudeClass>,
18059    /// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
18060    /// and  `"rule"`.
18061    #[serde(skip_serializing_if = "Option::is_none")]
18062    #[builder(default)]
18063    pub longitude2: Option<Longitude2Class>,
18064    /// Opacity of the marks.
18065    ///
18066    /// __Default value:__ If undefined, the default opacity depends on [mark
18067    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
18068    /// property.
18069    #[serde(skip_serializing_if = "Option::is_none")]
18070    #[builder(default)]
18071    pub opacity: Option<OpacityClass>,
18072    /// Order of the marks.
18073    /// - For stacked marks, this `order` channel encodes [stack
18074    /// order](https://vega.github.io/vega-lite/docs/stack.html#order).
18075    /// - For line and trail marks, this `order` channel encodes order of data points in the
18076    /// lines. This can be useful for creating [a connected
18077    /// scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html).
18078    /// Setting `order` to `{"value": null}` makes the line marks use the original order in the
18079    /// data sources.
18080    /// - Otherwise, this `order` channel encodes layer order of the marks.
18081    ///
18082    /// __Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating
18083    /// additional aggregation grouping.
18084    #[serde(skip_serializing_if = "Option::is_none")]
18085    #[builder(default)]
18086    pub order: Option<Order>,
18087    /// The outer radius in pixels of arc marks.
18088    #[serde(skip_serializing_if = "Option::is_none")]
18089    #[builder(default)]
18090    pub radius: Option<RadiusClass>,
18091    /// The inner radius in pixels of arc marks.
18092    #[serde(skip_serializing_if = "Option::is_none")]
18093    #[builder(default)]
18094    pub radius2: Option<Radius2Class>,
18095    /// Shape of the mark.
18096    ///
18097    /// 1. For `point` marks the supported values include:   - plotting shapes: `"circle"`,
18098    /// `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`,
18099    /// `"triangle-right"`, or `"triangle-left"`.   - the line symbol `"stroke"`   - centered
18100    /// directional shapes `"arrow"`, `"wedge"`, or `"triangle"`   - a custom [SVG path
18101    /// string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct
18102    /// sizing, custom shape paths should be defined within a square bounding box with
18103    /// coordinates ranging from -1 to 1 along both the x and y dimensions.)
18104    ///
18105    /// 2. For `geoshape` marks it should be a field definition of the geojson data
18106    ///
18107    /// __Default value:__ If undefined, the default shape depends on [mark
18108    /// config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape`
18109    /// property. (`"circle"` if unset.)
18110    #[serde(skip_serializing_if = "Option::is_none")]
18111    #[builder(default)]
18112    pub shape: Option<MarkPropDefStringNullTypeForShape>,
18113    /// Size of the mark.
18114    /// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
18115    /// - For `"bar"` and `"tick"` – the bar and tick's size.
18116    /// - For `"text"` – the text's font size.
18117    /// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
18118    /// line with varying size)
18119    #[serde(skip_serializing_if = "Option::is_none")]
18120    #[builder(default)]
18121    pub size: Option<SizeClass>,
18122    /// Stroke color of the marks. __Default value:__ If undefined, the default color depends on
18123    /// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
18124    /// property.
18125    ///
18126    /// _Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the
18127    /// `color` encoding if conflicting encodings are specified.
18128    #[serde(skip_serializing_if = "Option::is_none")]
18129    #[builder(default)]
18130    pub stroke: Option<StrokeClass>,
18131    /// Stroke dash of the marks.
18132    ///
18133    /// __Default value:__ `[1,0]` (No dash).
18134    #[serde(skip_serializing_if = "Option::is_none")]
18135    #[builder(default)]
18136    pub stroke_dash: Option<MarkPropDefNumber>,
18137    /// Stroke opacity of the marks.
18138    ///
18139    /// __Default value:__ If undefined, the default opacity depends on [mark
18140    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
18141    /// property.
18142    #[serde(skip_serializing_if = "Option::is_none")]
18143    #[builder(default)]
18144    pub stroke_opacity: Option<StrokeOpacityClass>,
18145    /// Stroke width of the marks.
18146    ///
18147    /// __Default value:__ If undefined, the default stroke width depends on [mark
18148    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
18149    /// property.
18150    #[serde(skip_serializing_if = "Option::is_none")]
18151    #[builder(default)]
18152    pub stroke_width: Option<StrokeWidthClass>,
18153    /// Text of the `text` mark.
18154    #[serde(skip_serializing_if = "Option::is_none")]
18155    #[builder(default)]
18156    pub text: Option<TextDef>,
18157    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
18158    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
18159    /// clockwise.)
18160    ///
18161    /// - For text marks, polar coordinate angle in radians.
18162    #[serde(skip_serializing_if = "Option::is_none")]
18163    #[builder(default)]
18164    pub theta: Option<ThetaClass>,
18165    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
18166    /// values proceed clockwise.
18167    #[serde(skip_serializing_if = "Option::is_none")]
18168    #[builder(default)]
18169    pub theta2: Option<Theta2Class>,
18170    #[serde(skip_serializing_if = "Option::is_none")]
18171    #[builder(default)]
18172    pub time: Option<TimeFieldDef>,
18173    /// The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the
18174    /// `tooltip` property in the mark
18175    /// definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
18176    ///
18177    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
18178    /// a detailed discussion about tooltip in Vega-Lite.
18179    #[serde(skip_serializing_if = "Option::is_none")]
18180    #[builder(default)]
18181    pub tooltip: Option<EncodingTooltip>,
18182    /// The URL of an image mark.
18183    #[serde(skip_serializing_if = "Option::is_none")]
18184    #[builder(default)]
18185    pub url: Option<UrlClass>,
18186    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
18187    /// `x2` or `width`.
18188    ///
18189    /// The `value` of this channel can be a number or a string `"width"` for the width of the
18190    /// plot.
18191    #[serde(skip_serializing_if = "Option::is_none")]
18192    #[builder(default)]
18193    pub x: Option<XClass>,
18194    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
18195    ///
18196    /// The `value` of this channel can be a number or a string `"width"` for the width of the
18197    /// plot.
18198    #[serde(skip_serializing_if = "Option::is_none")]
18199    #[builder(default)]
18200    pub x2: Option<X2Class>,
18201    /// Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
18202    #[serde(skip_serializing_if = "Option::is_none")]
18203    #[builder(default)]
18204    pub x_error: Option<XErrorClass>,
18205    /// Secondary error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
18206    #[serde(skip_serializing_if = "Option::is_none")]
18207    #[builder(default)]
18208    pub x_error2: Option<XError2Class>,
18209    /// Offset of x-position of the marks
18210    #[serde(skip_serializing_if = "Option::is_none")]
18211    #[builder(default)]
18212    pub x_offset: Option<XOffsetClass>,
18213    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
18214    /// `y2` or `height`.
18215    ///
18216    /// The `value` of this channel can be a number or a string `"height"` for the height of the
18217    /// plot.
18218    #[serde(skip_serializing_if = "Option::is_none")]
18219    #[builder(default)]
18220    pub y: Option<YClass>,
18221    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
18222    ///
18223    /// The `value` of this channel can be a number or a string `"height"` for the height of the
18224    /// plot.
18225    #[serde(skip_serializing_if = "Option::is_none")]
18226    #[builder(default)]
18227    pub y2: Option<Y2Class>,
18228    /// Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
18229    #[serde(skip_serializing_if = "Option::is_none")]
18230    #[builder(default)]
18231    pub y_error: Option<YErrorClass>,
18232    /// Secondary error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
18233    #[serde(skip_serializing_if = "Option::is_none")]
18234    #[builder(default)]
18235    pub y_error2: Option<YError2Class>,
18236    /// Offset of y-position of the marks
18237    #[serde(skip_serializing_if = "Option::is_none")]
18238    #[builder(default)]
18239    pub y_offset: Option<YOffsetClass>,
18240}
18241
18242/// A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
18243/// `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark
18244/// definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
18245#[derive(Debug, Clone, Serialize, Deserialize)]
18246#[serde(untagged)]
18247#[derive(From)]
18248pub enum AnyMark {
18249    Def(Def),
18250    Enum(Mark),
18251}
18252
18253#[derive(Debug, Clone, Serialize, Deserialize)]
18254#[serde(rename_all = "camelCase")]
18255#[derive(Default, Builder)]
18256#[builder(setter(into, strip_option))]
18257pub struct Def {
18258    #[serde(rename = "box")]
18259    #[serde(skip_serializing_if = "Option::is_none")]
18260    #[builder(default)]
18261    pub def_box: Option<AnyMarkConfig>,
18262    /// Whether a composite mark be clipped to the enclosing group’s width and height.
18263    ///
18264    /// Whether a mark be clipped to the enclosing group’s width and height.
18265    #[serde(skip_serializing_if = "Option::is_none")]
18266    #[builder(default)]
18267    pub clip: Option<Aria>,
18268    /// Default color.
18269    ///
18270    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
18271    ///
18272    /// __Note:__
18273    /// - This property cannot be used in a [style
18274    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
18275    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
18276    /// override `color`.
18277    #[serde(skip_serializing_if = "Option::is_none")]
18278    #[builder(default)]
18279    pub color: Option<MarkConfigColor>,
18280    /// The extent of the whiskers. Available options include:
18281    /// - `"min-max"`: min and max are the lower and upper whiskers respectively.
18282    /// - A number representing multiple of the interquartile range. This number will be
18283    /// multiplied by the IQR to determine whisker boundary, which spans from the smallest data
18284    /// to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_
18285    /// are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).
18286    ///
18287    /// __Default value:__ `1.5`.
18288    ///
18289    /// The extent of the rule. Available options include:
18290    /// - `"ci"`: Extend the rule to the 95% bootstrapped confidence interval of the mean.
18291    /// - `"stderr"`: The size of rule are set to the value of standard error, extending from the
18292    /// mean.
18293    /// - `"stdev"`: The size of rule are set to the value of standard deviation, extending from
18294    /// the mean.
18295    /// - `"iqr"`: Extend the rule to the q1 and q3.
18296    ///
18297    /// __Default value:__ `"stderr"`.
18298    ///
18299    /// The extent of the band. Available options include:
18300    /// - `"ci"`: Extend the band to the 95% bootstrapped confidence interval of the mean.
18301    /// - `"stderr"`: The size of band are set to the value of standard error, extending from the
18302    /// mean.
18303    /// - `"stdev"`: The size of band are set to the value of standard deviation, extending from
18304    /// the mean.
18305    /// - `"iqr"`: Extend the band to the q1 and q3.
18306    ///
18307    /// __Default value:__ `"stderr"`.
18308    #[serde(skip_serializing_if = "Option::is_none")]
18309    #[builder(default)]
18310    pub extent: Option<MarkDefExtent>,
18311    /// Invalid data mode, which defines how the marks and corresponding scales should represent
18312    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
18313    /// invalid values).
18314    ///
18315    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
18316    /// *scales*. For path marks (for line, area, trail), this option will create paths that
18317    /// connect valid points, as if the data rows with invalid values do not exist.
18318    ///
18319    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
18320    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
18321    /// *exclude* these filtered data points.
18322    ///
18323    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
18324    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
18325    /// data points (for both path and non-path marks).
18326    ///
18327    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
18328    /// will use the output for invalid values defined in `config.scale.invalid` or, if
18329    /// unspecified, by default invalid values will produce the same visual values as zero (if
18330    /// the scale includes zero) or the minimum value (if the scale does not include zero).
18331    ///
18332    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
18333    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
18334    /// non-path marks.
18335    ///
18336    /// __Note__: If any channel's scale has an output for invalid values defined in
18337    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
18338    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
18339    /// be filtered and will not cause path breaks.
18340    #[serde(skip_serializing_if = "Option::is_none")]
18341    #[builder(default)]
18342    pub invalid: Option<MarkInvalidDataMode>,
18343    #[serde(skip_serializing_if = "Option::is_none")]
18344    #[builder(default)]
18345    pub median: Option<AnyMarkConfig>,
18346    /// The opacity (value between [0,1]) of the mark.
18347    ///
18348    /// The overall opacity (value between [0,1]).
18349    ///
18350    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
18351    /// `square` marks or layered `bar` charts and `1` otherwise.
18352    #[serde(skip_serializing_if = "Option::is_none")]
18353    #[builder(default)]
18354    pub opacity: Option<Opacity>,
18355    /// Orientation of the box plot. This is normally automatically determined based on types of
18356    /// fields on x and y channels. However, an explicit `orient` be specified when the
18357    /// orientation is ambiguous.
18358    ///
18359    /// __Default value:__ `"vertical"`.
18360    ///
18361    /// Orientation of the error bar. This is normally automatically determined, but can be
18362    /// specified when the orientation is ambiguous and cannot be automatically determined.
18363    ///
18364    /// Orientation of the error band. This is normally automatically determined, but can be
18365    /// specified when the orientation is ambiguous and cannot be automatically determined.
18366    ///
18367    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
18368    /// horizontal (default) or vertical.
18369    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
18370    /// applied to x or y dimension.
18371    /// - For area, this property determines the orient property of the Vega output.
18372    /// - For line and trail marks, this property determines the sort order of the points in the
18373    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
18374    /// determined by the orientation of the stack; therefore explicitly specified value will be
18375    /// ignored.
18376    #[serde(skip_serializing_if = "Option::is_none")]
18377    #[builder(default)]
18378    pub orient: Option<Orientation>,
18379    #[serde(skip_serializing_if = "Option::is_none")]
18380    #[builder(default)]
18381    pub outliers: Option<AnyMarkConfig>,
18382    #[serde(skip_serializing_if = "Option::is_none")]
18383    #[builder(default)]
18384    pub rule: Option<AnyMarkConfig>,
18385    /// Size of the box and median tick of a box plot
18386    ///
18387    /// Size of the ticks of an error bar
18388    ///
18389    /// Default size for marks.
18390    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
18391    /// this value sets the area of the symbol; the side lengths will increase with the square
18392    /// root of this value.
18393    /// - For `bar`, this represents the band size of the bar, in pixels.
18394    /// - For `text`, this represents the font size, in pixels.
18395    ///
18396    /// __Default value:__
18397    /// - `30` for point, circle, square marks; width/height's `step`
18398    /// - `2` for bar marks with discrete dimensions;
18399    /// - `5` for bar marks with continuous dimensions;
18400    /// - `11` for text marks.
18401    #[serde(skip_serializing_if = "Option::is_none")]
18402    #[builder(default)]
18403    pub size: Option<CornerRadiusUnion>,
18404    #[serde(skip_serializing_if = "Option::is_none")]
18405    #[builder(default)]
18406    pub ticks: Option<AnyMarkConfig>,
18407    /// The mark type. This could a primitive mark type (one of `"bar"`, `"circle"`, `"square"`,
18408    /// `"tick"`, `"line"`, `"area"`, `"point"`, `"geoshape"`, `"rule"`, and `"text"`) or a
18409    /// composite mark type (`"boxplot"`, `"errorband"`, `"errorbar"`).
18410    #[serde(rename = "type")]
18411    #[serde(skip_serializing_if = "Option::is_none")]
18412    #[builder(default)]
18413    pub def_type: Option<Mark>,
18414    /// Thickness of the ticks and the bar of an error bar
18415    ///
18416    /// Thickness of the tick mark.
18417    ///
18418    /// __Default value:__  `1`
18419    #[serde(skip_serializing_if = "Option::is_none")]
18420    #[builder(default)]
18421    pub thickness: Option<f64>,
18422    #[serde(skip_serializing_if = "Option::is_none")]
18423    #[builder(default)]
18424    pub band: Option<AnyMarkConfig>,
18425    #[serde(skip_serializing_if = "Option::is_none")]
18426    #[builder(default)]
18427    pub borders: Option<AnyMarkConfig>,
18428    /// The line interpolation method for the error band. One of the following:
18429    /// - `"linear"`: piecewise linear segments, as in a polyline.
18430    /// - `"linear-closed"`: close the linear segments to form a polygon.
18431    /// - `"step"`: a piecewise constant function (a step function) consisting of alternating
18432    /// horizontal and vertical lines. The y-value changes at the midpoint of each pair of
18433    /// adjacent x-values.
18434    /// - `"step-before"`: a piecewise constant function (a step function) consisting of
18435    /// alternating horizontal and vertical lines. The y-value changes before the x-value.
18436    /// - `"step-after"`: a piecewise constant function (a step function) consisting of
18437    /// alternating horizontal and vertical lines. The y-value changes after the x-value.
18438    /// - `"basis"`: a B-spline, with control point duplication on the ends.
18439    /// - `"basis-open"`: an open B-spline; may not intersect the start or end.
18440    /// - `"basis-closed"`: a closed B-spline, as in a loop.
18441    /// - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
18442    /// - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
18443    /// will intersect other control points.
18444    /// - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
18445    /// - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
18446    /// spline.
18447    /// - `"monotone"`: cubic interpolation that preserves monotonicity in y.
18448    #[serde(skip_serializing_if = "Option::is_none")]
18449    #[builder(default)]
18450    pub interpolate: Option<MarkConfigInterpolate>,
18451    /// The tension parameter for the interpolation type of the error band.
18452    #[serde(skip_serializing_if = "Option::is_none")]
18453    #[builder(default)]
18454    pub tension: Option<Opacity>,
18455    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
18456    /// of `"left"`, `"right"`, `"center"`.
18457    ///
18458    /// __Note:__ Expression reference is *not* supported for range marks.
18459    #[serde(skip_serializing_if = "Option::is_none")]
18460    #[builder(default)]
18461    pub align: Option<TitleAlignUnion>,
18462    #[serde(skip_serializing_if = "Option::is_none")]
18463    #[builder(default)]
18464    pub angle: Option<Angle>,
18465    #[serde(skip_serializing_if = "Option::is_none")]
18466    #[builder(default)]
18467    pub aria: Option<Aria>,
18468    #[serde(skip_serializing_if = "Option::is_none")]
18469    #[builder(default)]
18470    pub aria_role: Option<Box<Color>>,
18471    #[serde(skip_serializing_if = "Option::is_none")]
18472    #[builder(default)]
18473    pub aria_role_description: Option<Box<Color>>,
18474    #[serde(skip_serializing_if = "Option::is_none")]
18475    #[builder(default)]
18476    pub aspect: Option<Aria>,
18477    /// The width of the ticks.
18478    ///
18479    /// __Default value:__  3/4 of step (width step for horizontal ticks and height step for
18480    /// vertical ticks).
18481    #[serde(skip_serializing_if = "Option::is_none")]
18482    #[builder(default)]
18483    pub band_size: Option<f64>,
18484    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
18485    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
18486    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
18487    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
18488    /// rather than `fontSize` alone.
18489    ///
18490    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
18491    /// `"bottom"`.
18492    ///
18493    /// __Note:__ Expression reference is *not* supported for range marks.
18494    #[serde(skip_serializing_if = "Option::is_none")]
18495    #[builder(default)]
18496    pub baseline: Option<TextBaseline>,
18497    /// Offset between bars for binned field. The ideal value for this is either 0 (preferred by
18498    /// statisticians) or 1 (Vega-Lite default, D3 example style).
18499    ///
18500    /// __Default value:__ `1`
18501    #[serde(skip_serializing_if = "Option::is_none")]
18502    #[builder(default)]
18503    pub bin_spacing: Option<f64>,
18504    #[serde(skip_serializing_if = "Option::is_none")]
18505    #[builder(default)]
18506    pub blend: Option<BlendUnion>,
18507    /// The default size of the bars on continuous scales.
18508    ///
18509    /// __Default value:__ `5`
18510    #[serde(skip_serializing_if = "Option::is_none")]
18511    #[builder(default)]
18512    pub continuous_band_size: Option<f64>,
18513    #[serde(skip_serializing_if = "Option::is_none")]
18514    #[builder(default)]
18515    pub corner_radius: Option<CornerRadiusUnion>,
18516    #[serde(skip_serializing_if = "Option::is_none")]
18517    #[builder(default)]
18518    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
18519    #[serde(skip_serializing_if = "Option::is_none")]
18520    #[builder(default)]
18521    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
18522    /// - For vertical bars, top-left and top-right corner radius.
18523    ///
18524    /// - For horizontal bars, top-right and bottom-right corner radius.
18525    #[serde(skip_serializing_if = "Option::is_none")]
18526    #[builder(default)]
18527    pub corner_radius_end: Option<CornerRadiusUnion>,
18528    #[serde(skip_serializing_if = "Option::is_none")]
18529    #[builder(default)]
18530    pub corner_radius_top_left: Option<CornerRadiusUnion>,
18531    #[serde(skip_serializing_if = "Option::is_none")]
18532    #[builder(default)]
18533    pub corner_radius_top_right: Option<CornerRadiusUnion>,
18534    #[serde(skip_serializing_if = "Option::is_none")]
18535    #[builder(default)]
18536    pub cursor: Option<CursorUnion>,
18537    #[serde(skip_serializing_if = "Option::is_none")]
18538    #[builder(default)]
18539    pub description: Option<Box<Color>>,
18540    #[serde(skip_serializing_if = "Option::is_none")]
18541    #[builder(default)]
18542    pub dir: Option<Dir>,
18543    /// The default size of the bars with discrete dimensions. If unspecified, the default size
18544    /// is  `step-2`, which provides 2 pixel offset between bars.
18545    #[serde(skip_serializing_if = "Option::is_none")]
18546    #[builder(default)]
18547    pub discrete_band_size: Option<DiscreteBandSize>,
18548    #[serde(skip_serializing_if = "Option::is_none")]
18549    #[builder(default)]
18550    pub dx: Option<CornerRadiusUnion>,
18551    #[serde(skip_serializing_if = "Option::is_none")]
18552    #[builder(default)]
18553    pub dy: Option<CornerRadiusUnion>,
18554    #[serde(skip_serializing_if = "Option::is_none")]
18555    #[builder(default)]
18556    pub ellipsis: Option<Box<Color>>,
18557    /// Default fill color. This property has higher precedence than `config.color`. Set to
18558    /// `null` to remove fill.
18559    ///
18560    /// __Default value:__ (None)
18561    #[serde(skip_serializing_if = "Option::is_none")]
18562    #[builder(default)]
18563    pub fill: Option<MarkConfigFill>,
18564    /// Whether the mark's color should be used as fill color instead of stroke color.
18565    ///
18566    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
18567    /// `geoshape` marks for
18568    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
18569    /// otherwise, `true`.
18570    ///
18571    /// __Note:__ This property cannot be used in a [style
18572    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
18573    #[serde(skip_serializing_if = "Option::is_none")]
18574    #[builder(default)]
18575    pub filled: Option<bool>,
18576    #[serde(skip_serializing_if = "Option::is_none")]
18577    #[builder(default)]
18578    pub fill_opacity: Option<Opacity>,
18579    #[serde(skip_serializing_if = "Option::is_none")]
18580    #[builder(default)]
18581    pub font: Option<Box<Color>>,
18582    #[serde(skip_serializing_if = "Option::is_none")]
18583    #[builder(default)]
18584    pub font_size: Option<FontSize>,
18585    #[serde(skip_serializing_if = "Option::is_none")]
18586    #[builder(default)]
18587    pub font_style: Option<Box<Color>>,
18588    #[serde(skip_serializing_if = "Option::is_none")]
18589    #[builder(default)]
18590    pub font_weight: Option<FontWeightUnion>,
18591    /// Height of the marks.  One of:
18592    ///
18593    /// - A number representing a fixed pixel height.
18594    ///
18595    /// - A relative band size definition.  For example, `{band: 0.5}` represents half of the band
18596    #[serde(skip_serializing_if = "Option::is_none")]
18597    #[builder(default)]
18598    pub height: Option<BoxPlotDefHeight>,
18599    #[serde(skip_serializing_if = "Option::is_none")]
18600    #[builder(default)]
18601    pub href: Option<Box<Color>>,
18602    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
18603    ///
18604    /// __Default value:__ `0`
18605    #[serde(skip_serializing_if = "Option::is_none")]
18606    #[builder(default)]
18607    pub inner_radius: Option<CornerRadiusUnion>,
18608    #[serde(skip_serializing_if = "Option::is_none")]
18609    #[builder(default)]
18610    pub limit: Option<CornerRadiusUnion>,
18611    /// A flag for overlaying line on top of area marks, or an object defining the properties of
18612    /// the overlayed lines.
18613    ///
18614    /// - If this value is an empty object (`{}`) or `true`, lines with default properties will
18615    /// be used.
18616    ///
18617    /// - If this value is `false`, no lines would be automatically added to area marks.
18618    ///
18619    /// __Default value:__ `false`.
18620    #[serde(skip_serializing_if = "Option::is_none")]
18621    #[builder(default)]
18622    pub line: Option<Line>,
18623    #[serde(skip_serializing_if = "Option::is_none")]
18624    #[builder(default)]
18625    pub line_break: Option<Box<Color>>,
18626    #[serde(skip_serializing_if = "Option::is_none")]
18627    #[builder(default)]
18628    pub line_height: Option<CornerRadiusUnion>,
18629    /// The minimum band size for bar and rectangle marks. __Default value:__ `0.25`
18630    #[serde(skip_serializing_if = "Option::is_none")]
18631    #[builder(default)]
18632    pub min_band_size: Option<CornerRadiusUnion>,
18633    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
18634    /// the lines use the original order in the data sources.
18635    #[serde(skip_serializing_if = "Option::is_none")]
18636    #[builder(default)]
18637    pub order: Option<bool>,
18638    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
18639    ///
18640    /// __Default value:__ `0`
18641    #[serde(skip_serializing_if = "Option::is_none")]
18642    #[builder(default)]
18643    pub outer_radius: Option<CornerRadiusUnion>,
18644    #[serde(skip_serializing_if = "Option::is_none")]
18645    #[builder(default)]
18646    pub pad_angle: Option<CornerRadiusUnion>,
18647    /// A flag for overlaying points on top of line or area marks, or an object defining the
18648    /// properties of the overlayed points.
18649    ///
18650    /// - If this property is `"transparent"`, transparent points will be used (for enhancing
18651    /// tooltips and selections).
18652    ///
18653    /// - If this property is an empty object (`{}`) or `true`, filled points with default
18654    /// properties will be used.
18655    ///
18656    /// - If this property is `false`, no points would be automatically added to line or area
18657    /// marks.
18658    ///
18659    /// __Default value:__ `false`.
18660    #[serde(skip_serializing_if = "Option::is_none")]
18661    #[builder(default)]
18662    pub point: Option<PointUnion>,
18663    /// For arc mark, the primary (outer) radius in pixels.
18664    ///
18665    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
18666    /// determined by the `x` and `y` properties.
18667    ///
18668    /// __Default value:__ `min(plot_width, plot_height)/2`
18669    #[serde(skip_serializing_if = "Option::is_none")]
18670    #[builder(default)]
18671    pub radius: Option<CornerRadiusUnion>,
18672    /// The secondary (inner) radius in pixels of arc marks.
18673    ///
18674    /// __Default value:__ `0`
18675    #[serde(skip_serializing_if = "Option::is_none")]
18676    #[builder(default)]
18677    pub radius2: Option<CornerRadiusUnion>,
18678    /// Offset for radius2.
18679    #[serde(skip_serializing_if = "Option::is_none")]
18680    #[builder(default)]
18681    pub radius2_offset: Option<CornerRadiusUnion>,
18682    /// Offset for radius.
18683    #[serde(skip_serializing_if = "Option::is_none")]
18684    #[builder(default)]
18685    pub radius_offset: Option<CornerRadiusUnion>,
18686    #[serde(skip_serializing_if = "Option::is_none")]
18687    #[builder(default)]
18688    pub shape: Option<Box<Color>>,
18689    #[serde(skip_serializing_if = "Option::is_none")]
18690    #[builder(default)]
18691    pub smooth: Option<Aria>,
18692    /// Default stroke color. This property has higher precedence than `config.color`. Set to
18693    /// `null` to remove stroke.
18694    ///
18695    /// __Default value:__ (None)
18696    #[serde(skip_serializing_if = "Option::is_none")]
18697    #[builder(default)]
18698    pub stroke: Option<MarkConfigFill>,
18699    #[serde(skip_serializing_if = "Option::is_none")]
18700    #[builder(default)]
18701    pub stroke_cap: Option<Cap>,
18702    #[serde(skip_serializing_if = "Option::is_none")]
18703    #[builder(default)]
18704    pub stroke_dash: Option<StrokeDashUnion>,
18705    #[serde(skip_serializing_if = "Option::is_none")]
18706    #[builder(default)]
18707    pub stroke_dash_offset: Option<CornerRadiusUnion>,
18708    #[serde(skip_serializing_if = "Option::is_none")]
18709    #[builder(default)]
18710    pub stroke_join: Option<StrokeJoinUnion>,
18711    #[serde(skip_serializing_if = "Option::is_none")]
18712    #[builder(default)]
18713    pub stroke_miter_limit: Option<CornerRadiusUnion>,
18714    #[serde(skip_serializing_if = "Option::is_none")]
18715    #[builder(default)]
18716    pub stroke_offset: Option<CornerRadiusUnion>,
18717    #[serde(skip_serializing_if = "Option::is_none")]
18718    #[builder(default)]
18719    pub stroke_opacity: Option<Opacity>,
18720    #[serde(skip_serializing_if = "Option::is_none")]
18721    #[builder(default)]
18722    pub stroke_width: Option<FontSize>,
18723    /// A string or array of strings indicating the name of custom styles to apply to the mark. A
18724    /// style is a named collection of mark property defaults defined within the [style
18725    /// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
18726    /// an array, later styles will override earlier styles. Any [mark
18727    /// properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly
18728    /// defined within the `encoding` will override a style default.
18729    ///
18730    /// __Default value:__ The mark's name. For example, a bar mark will have style `"bar"` by
18731    /// default. __Note:__ Any specified style will augment the default style. For example, a bar
18732    /// mark with `"style": "foo"` will receive from `config.style.bar` and `config.style.foo`
18733    /// (the specified style `"foo"` has higher precedence).
18734    #[serde(skip_serializing_if = "Option::is_none")]
18735    #[builder(default)]
18736    pub style: Option<LegendText>,
18737    #[serde(skip_serializing_if = "Option::is_none")]
18738    #[builder(default)]
18739    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
18740    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
18741    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
18742    /// clockwise.)
18743    ///
18744    /// - For text marks, polar coordinate angle in radians.
18745    #[serde(skip_serializing_if = "Option::is_none")]
18746    #[builder(default)]
18747    pub theta: Option<CornerRadiusUnion>,
18748    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
18749    /// values proceed clockwise.
18750    #[serde(skip_serializing_if = "Option::is_none")]
18751    #[builder(default)]
18752    pub theta2: Option<CornerRadiusUnion>,
18753    /// Offset for theta2.
18754    #[serde(skip_serializing_if = "Option::is_none")]
18755    #[builder(default)]
18756    pub theta2_offset: Option<CornerRadiusUnion>,
18757    /// Offset for theta.
18758    #[serde(skip_serializing_if = "Option::is_none")]
18759    #[builder(default)]
18760    pub theta_offset: Option<CornerRadiusUnion>,
18761    #[serde(skip_serializing_if = "Option::is_none")]
18762    #[builder(default)]
18763    pub time: Option<CornerRadiusUnion>,
18764    /// Default relative band position for a time unit. If set to `0`, the marks will be
18765    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
18766    /// be positioned in the middle of the time unit band step.
18767    #[serde(skip_serializing_if = "Option::is_none")]
18768    #[builder(default)]
18769    pub time_unit_band_position: Option<f64>,
18770    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
18771    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
18772    /// half of the time unit band step.
18773    #[serde(skip_serializing_if = "Option::is_none")]
18774    #[builder(default)]
18775    pub time_unit_band_size: Option<f64>,
18776    /// The tooltip text string to show upon mouse hover or an object defining which fields
18777    /// should the tooltip be derived from.
18778    ///
18779    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
18780    /// will be used.
18781    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
18782    /// data point will be used.
18783    /// - If set to `null` or `false`, then no tooltip will be used.
18784    ///
18785    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
18786    /// a detailed discussion about tooltip  in Vega-Lite.
18787    ///
18788    /// __Default value:__ `null`
18789    #[serde(skip_serializing_if = "Option::is_none")]
18790    #[builder(default)]
18791    pub tooltip: Option<OverlayMarkDefTooltip>,
18792    #[serde(skip_serializing_if = "Option::is_none")]
18793    #[builder(default)]
18794    pub url: Option<Box<Color>>,
18795    /// Width of the marks.  One of:
18796    ///
18797    /// - A number representing a fixed pixel width.
18798    ///
18799    /// - A relative band size definition.  For example, `{band: 0.5}` represents half of the
18800    /// band.
18801    #[serde(skip_serializing_if = "Option::is_none")]
18802    #[builder(default)]
18803    pub width: Option<BoxPlotDefHeight>,
18804    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
18805    /// `x2` or `width`.
18806    ///
18807    /// The `value` of this channel can be a number or a string `"width"` for the width of the
18808    /// plot.
18809    #[serde(skip_serializing_if = "Option::is_none")]
18810    #[builder(default)]
18811    pub x: Option<XUnion>,
18812    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
18813    ///
18814    /// The `value` of this channel can be a number or a string `"width"` for the width of the
18815    /// plot.
18816    #[serde(skip_serializing_if = "Option::is_none")]
18817    #[builder(default)]
18818    pub x2: Option<XUnion>,
18819    /// Offset for x2-position.
18820    #[serde(skip_serializing_if = "Option::is_none")]
18821    #[builder(default)]
18822    pub x2_offset: Option<CornerRadiusUnion>,
18823    /// Offset for x-position.
18824    #[serde(skip_serializing_if = "Option::is_none")]
18825    #[builder(default)]
18826    pub x_offset: Option<CornerRadiusUnion>,
18827    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
18828    /// `y2` or `height`.
18829    ///
18830    /// The `value` of this channel can be a number or a string `"height"` for the height of the
18831    /// plot.
18832    #[serde(skip_serializing_if = "Option::is_none")]
18833    #[builder(default)]
18834    pub y: Option<YUnion>,
18835    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
18836    ///
18837    /// The `value` of this channel can be a number or a string `"height"` for the height of the
18838    /// plot.
18839    #[serde(skip_serializing_if = "Option::is_none")]
18840    #[builder(default)]
18841    pub y2: Option<YUnion>,
18842    /// Offset for y2-position.
18843    #[serde(skip_serializing_if = "Option::is_none")]
18844    #[builder(default)]
18845    pub y2_offset: Option<CornerRadiusUnion>,
18846    /// Offset for y-position.
18847    #[serde(skip_serializing_if = "Option::is_none")]
18848    #[builder(default)]
18849    pub y_offset: Option<CornerRadiusUnion>,
18850}
18851
18852#[derive(Debug, Clone, Serialize, Deserialize)]
18853#[serde(untagged)]
18854#[derive(From)]
18855pub enum Angle {
18856    BackgroundExprRef(BackgroundExprRef),
18857    Double(f64),
18858}
18859
18860#[derive(Debug, Clone, Serialize, Deserialize)]
18861#[serde(untagged)]
18862#[derive(From)]
18863pub enum AnyMarkConfig {
18864    Bool(bool),
18865    Config(Config),
18866}
18867
18868/// Circle-Specific Config
18869///
18870/// Geoshape-Specific Config
18871///
18872/// Mark Config
18873///
18874/// Point-Specific Config
18875///
18876/// Rule-Specific Config
18877///
18878/// Square-Specific Config
18879///
18880/// Default style for chart subtitles
18881///
18882/// Default style for chart titles
18883///
18884/// Default style for axis, legend, and header labels.
18885///
18886/// Default style for axis, legend, and header titles.
18887///
18888/// Text-Specific Config
18889///
18890/// Area-Specific Config
18891///
18892/// Bar-Specific Config
18893///
18894/// Arc-specific Config
18895///
18896/// Image-specific Config
18897///
18898/// Rect-Specific Config
18899///
18900/// Line-Specific Config
18901///
18902/// Trail-Specific Config
18903///
18904/// Tick-Specific Config
18905#[derive(Debug, Clone, Serialize, Deserialize)]
18906#[serde(rename_all = "camelCase")]
18907#[derive(Default, Builder)]
18908#[builder(setter(into, strip_option))]
18909pub struct Config {
18910    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
18911    /// of `"left"`, `"right"`, `"center"`.
18912    ///
18913    /// __Note:__ Expression reference is *not* supported for range marks.
18914    #[serde(skip_serializing_if = "Option::is_none")]
18915    #[builder(default)]
18916    pub align: Option<TitleAlignUnion>,
18917    #[serde(skip_serializing_if = "Option::is_none")]
18918    #[builder(default)]
18919    pub angle: Option<Angle>,
18920    #[serde(skip_serializing_if = "Option::is_none")]
18921    #[builder(default)]
18922    pub aria: Option<Aria>,
18923    #[serde(skip_serializing_if = "Option::is_none")]
18924    #[builder(default)]
18925    pub aria_role: Option<Box<Color>>,
18926    #[serde(skip_serializing_if = "Option::is_none")]
18927    #[builder(default)]
18928    pub aria_role_description: Option<Box<Color>>,
18929    #[serde(skip_serializing_if = "Option::is_none")]
18930    #[builder(default)]
18931    pub aspect: Option<Aria>,
18932    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
18933    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
18934    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
18935    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
18936    /// rather than `fontSize` alone.
18937    ///
18938    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
18939    /// `"bottom"`.
18940    ///
18941    /// __Note:__ Expression reference is *not* supported for range marks.
18942    #[serde(skip_serializing_if = "Option::is_none")]
18943    #[builder(default)]
18944    pub baseline: Option<TextBaseline>,
18945    #[serde(skip_serializing_if = "Option::is_none")]
18946    #[builder(default)]
18947    pub blend: Option<BlendUnion>,
18948    /// Default color.
18949    ///
18950    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
18951    ///
18952    /// __Note:__
18953    /// - This property cannot be used in a [style
18954    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
18955    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
18956    /// override `color`.
18957    #[serde(skip_serializing_if = "Option::is_none")]
18958    #[builder(default)]
18959    pub color: Option<MarkConfigColor>,
18960    #[serde(skip_serializing_if = "Option::is_none")]
18961    #[builder(default)]
18962    pub corner_radius: Option<CornerRadiusUnion>,
18963    #[serde(skip_serializing_if = "Option::is_none")]
18964    #[builder(default)]
18965    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
18966    #[serde(skip_serializing_if = "Option::is_none")]
18967    #[builder(default)]
18968    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
18969    #[serde(skip_serializing_if = "Option::is_none")]
18970    #[builder(default)]
18971    pub corner_radius_top_left: Option<CornerRadiusUnion>,
18972    #[serde(skip_serializing_if = "Option::is_none")]
18973    #[builder(default)]
18974    pub corner_radius_top_right: Option<CornerRadiusUnion>,
18975    #[serde(skip_serializing_if = "Option::is_none")]
18976    #[builder(default)]
18977    pub cursor: Option<CursorUnion>,
18978    #[serde(skip_serializing_if = "Option::is_none")]
18979    #[builder(default)]
18980    pub description: Option<Box<Color>>,
18981    #[serde(skip_serializing_if = "Option::is_none")]
18982    #[builder(default)]
18983    pub dir: Option<Dir>,
18984    #[serde(skip_serializing_if = "Option::is_none")]
18985    #[builder(default)]
18986    pub dx: Option<CornerRadiusUnion>,
18987    #[serde(skip_serializing_if = "Option::is_none")]
18988    #[builder(default)]
18989    pub dy: Option<CornerRadiusUnion>,
18990    #[serde(skip_serializing_if = "Option::is_none")]
18991    #[builder(default)]
18992    pub ellipsis: Option<Box<Color>>,
18993    #[serde(skip_serializing_if = "Option::is_none")]
18994    #[builder(default)]
18995    pub end_angle: Option<CornerRadiusUnion>,
18996    /// Default fill color. This property has higher precedence than `config.color`. Set to
18997    /// `null` to remove fill.
18998    ///
18999    /// __Default value:__ (None)
19000    #[serde(skip_serializing_if = "Option::is_none")]
19001    #[builder(default)]
19002    pub fill: Option<MarkConfigFill>,
19003    /// Whether the mark's color should be used as fill color instead of stroke color.
19004    ///
19005    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
19006    /// `geoshape` marks for
19007    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
19008    /// otherwise, `true`.
19009    ///
19010    /// __Note:__ This property cannot be used in a [style
19011    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
19012    #[serde(skip_serializing_if = "Option::is_none")]
19013    #[builder(default)]
19014    pub filled: Option<bool>,
19015    #[serde(skip_serializing_if = "Option::is_none")]
19016    #[builder(default)]
19017    pub fill_opacity: Option<Opacity>,
19018    #[serde(skip_serializing_if = "Option::is_none")]
19019    #[builder(default)]
19020    pub font: Option<Box<Color>>,
19021    #[serde(skip_serializing_if = "Option::is_none")]
19022    #[builder(default)]
19023    pub font_size: Option<FontSize>,
19024    #[serde(skip_serializing_if = "Option::is_none")]
19025    #[builder(default)]
19026    pub font_style: Option<Box<Color>>,
19027    #[serde(skip_serializing_if = "Option::is_none")]
19028    #[builder(default)]
19029    pub font_weight: Option<FontWeightUnion>,
19030    #[serde(skip_serializing_if = "Option::is_none")]
19031    #[builder(default)]
19032    pub height: Option<CornerRadiusUnion>,
19033    #[serde(skip_serializing_if = "Option::is_none")]
19034    #[builder(default)]
19035    pub href: Option<Box<Color>>,
19036    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
19037    ///
19038    /// __Default value:__ `0`
19039    #[serde(skip_serializing_if = "Option::is_none")]
19040    #[builder(default)]
19041    pub inner_radius: Option<CornerRadiusUnion>,
19042    #[serde(skip_serializing_if = "Option::is_none")]
19043    #[builder(default)]
19044    pub interpolate: Option<MarkConfigInterpolate>,
19045    /// Invalid data mode, which defines how the marks and corresponding scales should represent
19046    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
19047    /// invalid values).
19048    ///
19049    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
19050    /// *scales*. For path marks (for line, area, trail), this option will create paths that
19051    /// connect valid points, as if the data rows with invalid values do not exist.
19052    ///
19053    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
19054    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
19055    /// *exclude* these filtered data points.
19056    ///
19057    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
19058    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
19059    /// data points (for both path and non-path marks).
19060    ///
19061    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
19062    /// will use the output for invalid values defined in `config.scale.invalid` or, if
19063    /// unspecified, by default invalid values will produce the same visual values as zero (if
19064    /// the scale includes zero) or the minimum value (if the scale does not include zero).
19065    ///
19066    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
19067    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
19068    /// non-path marks.
19069    ///
19070    /// __Note__: If any channel's scale has an output for invalid values defined in
19071    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
19072    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
19073    /// be filtered and will not cause path breaks.
19074    #[serde(skip_serializing_if = "Option::is_none")]
19075    #[builder(default)]
19076    pub invalid: Option<MarkInvalidDataMode>,
19077    #[serde(skip_serializing_if = "Option::is_none")]
19078    #[builder(default)]
19079    pub limit: Option<CornerRadiusUnion>,
19080    #[serde(skip_serializing_if = "Option::is_none")]
19081    #[builder(default)]
19082    pub line_break: Option<Box<Color>>,
19083    #[serde(skip_serializing_if = "Option::is_none")]
19084    #[builder(default)]
19085    pub line_height: Option<CornerRadiusUnion>,
19086    /// The overall opacity (value between [0,1]).
19087    ///
19088    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
19089    /// `square` marks or layered `bar` charts and `1` otherwise.
19090    #[serde(skip_serializing_if = "Option::is_none")]
19091    #[builder(default)]
19092    pub opacity: Option<CornerRadiusUnion>,
19093    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
19094    /// the lines use the original order in the data sources.
19095    #[serde(skip_serializing_if = "Option::is_none")]
19096    #[builder(default)]
19097    pub order: Option<bool>,
19098    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
19099    /// horizontal (default) or vertical.
19100    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
19101    /// applied to x or y dimension.
19102    /// - For area, this property determines the orient property of the Vega output.
19103    /// - For line and trail marks, this property determines the sort order of the points in the
19104    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
19105    /// determined by the orientation of the stack; therefore explicitly specified value will be
19106    /// ignored.
19107    #[serde(skip_serializing_if = "Option::is_none")]
19108    #[builder(default)]
19109    pub orient: Option<Orientation>,
19110    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
19111    ///
19112    /// __Default value:__ `0`
19113    #[serde(skip_serializing_if = "Option::is_none")]
19114    #[builder(default)]
19115    pub outer_radius: Option<CornerRadiusUnion>,
19116    #[serde(skip_serializing_if = "Option::is_none")]
19117    #[builder(default)]
19118    pub pad_angle: Option<CornerRadiusUnion>,
19119    /// For arc mark, the primary (outer) radius in pixels.
19120    ///
19121    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
19122    /// determined by the `x` and `y` properties.
19123    ///
19124    /// __Default value:__ `min(plot_width, plot_height)/2`
19125    #[serde(skip_serializing_if = "Option::is_none")]
19126    #[builder(default)]
19127    pub radius: Option<CornerRadiusUnion>,
19128    /// The secondary (inner) radius in pixels of arc marks.
19129    ///
19130    /// __Default value:__ `0`
19131    #[serde(skip_serializing_if = "Option::is_none")]
19132    #[builder(default)]
19133    pub radius2: Option<CornerRadiusUnion>,
19134    #[serde(skip_serializing_if = "Option::is_none")]
19135    #[builder(default)]
19136    pub shape: Option<Box<Color>>,
19137    /// Default size for marks.
19138    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
19139    /// this value sets the area of the symbol; the side lengths will increase with the square
19140    /// root of this value.
19141    /// - For `bar`, this represents the band size of the bar, in pixels.
19142    /// - For `text`, this represents the font size, in pixels.
19143    ///
19144    /// __Default value:__
19145    /// - `30` for point, circle, square marks; width/height's `step`
19146    /// - `2` for bar marks with discrete dimensions;
19147    /// - `5` for bar marks with continuous dimensions;
19148    /// - `11` for text marks.
19149    #[serde(skip_serializing_if = "Option::is_none")]
19150    #[builder(default)]
19151    pub size: Option<CornerRadiusUnion>,
19152    #[serde(skip_serializing_if = "Option::is_none")]
19153    #[builder(default)]
19154    pub smooth: Option<Aria>,
19155    #[serde(skip_serializing_if = "Option::is_none")]
19156    #[builder(default)]
19157    pub start_angle: Option<CornerRadiusUnion>,
19158    /// Default stroke color. This property has higher precedence than `config.color`. Set to
19159    /// `null` to remove stroke.
19160    ///
19161    /// __Default value:__ (None)
19162    #[serde(skip_serializing_if = "Option::is_none")]
19163    #[builder(default)]
19164    pub stroke: Option<MarkConfigFill>,
19165    #[serde(skip_serializing_if = "Option::is_none")]
19166    #[builder(default)]
19167    pub stroke_cap: Option<Cap>,
19168    #[serde(skip_serializing_if = "Option::is_none")]
19169    #[builder(default)]
19170    pub stroke_dash: Option<StrokeDashUnion>,
19171    #[serde(skip_serializing_if = "Option::is_none")]
19172    #[builder(default)]
19173    pub stroke_dash_offset: Option<CornerRadiusUnion>,
19174    #[serde(skip_serializing_if = "Option::is_none")]
19175    #[builder(default)]
19176    pub stroke_join: Option<StrokeJoinUnion>,
19177    #[serde(skip_serializing_if = "Option::is_none")]
19178    #[builder(default)]
19179    pub stroke_miter_limit: Option<CornerRadiusUnion>,
19180    #[serde(skip_serializing_if = "Option::is_none")]
19181    #[builder(default)]
19182    pub stroke_offset: Option<CornerRadiusUnion>,
19183    #[serde(skip_serializing_if = "Option::is_none")]
19184    #[builder(default)]
19185    pub stroke_opacity: Option<Opacity>,
19186    #[serde(skip_serializing_if = "Option::is_none")]
19187    #[builder(default)]
19188    pub stroke_width: Option<FontSize>,
19189    #[serde(skip_serializing_if = "Option::is_none")]
19190    #[builder(default)]
19191    pub tension: Option<CornerRadiusUnion>,
19192    #[serde(skip_serializing_if = "Option::is_none")]
19193    #[builder(default)]
19194    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
19195    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
19196    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
19197    /// clockwise.)
19198    ///
19199    /// - For text marks, polar coordinate angle in radians.
19200    #[serde(skip_serializing_if = "Option::is_none")]
19201    #[builder(default)]
19202    pub theta: Option<CornerRadiusUnion>,
19203    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
19204    /// values proceed clockwise.
19205    #[serde(skip_serializing_if = "Option::is_none")]
19206    #[builder(default)]
19207    pub theta2: Option<CornerRadiusUnion>,
19208    #[serde(skip_serializing_if = "Option::is_none")]
19209    #[builder(default)]
19210    pub time: Option<CornerRadiusUnion>,
19211    /// Default relative band position for a time unit. If set to `0`, the marks will be
19212    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
19213    /// be positioned in the middle of the time unit band step.
19214    #[serde(skip_serializing_if = "Option::is_none")]
19215    #[builder(default)]
19216    pub time_unit_band_position: Option<f64>,
19217    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
19218    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
19219    /// half of the time unit band step.
19220    #[serde(skip_serializing_if = "Option::is_none")]
19221    #[builder(default)]
19222    pub time_unit_band_size: Option<f64>,
19223    /// The tooltip text string to show upon mouse hover or an object defining which fields
19224    /// should the tooltip be derived from.
19225    ///
19226    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
19227    /// will be used.
19228    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
19229    /// data point will be used.
19230    /// - If set to `null` or `false`, then no tooltip will be used.
19231    ///
19232    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
19233    /// a detailed discussion about tooltip  in Vega-Lite.
19234    ///
19235    /// __Default value:__ `null`
19236    #[serde(skip_serializing_if = "Option::is_none")]
19237    #[builder(default)]
19238    pub tooltip: Option<OverlayMarkDefTooltip>,
19239    #[serde(skip_serializing_if = "Option::is_none")]
19240    #[builder(default)]
19241    pub url: Option<Box<Color>>,
19242    #[serde(skip_serializing_if = "Option::is_none")]
19243    #[builder(default)]
19244    pub width: Option<CornerRadiusUnion>,
19245    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
19246    /// `x2` or `width`.
19247    ///
19248    /// The `value` of this channel can be a number or a string `"width"` for the width of the
19249    /// plot.
19250    #[serde(skip_serializing_if = "Option::is_none")]
19251    #[builder(default)]
19252    pub x: Option<XUnion>,
19253    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
19254    ///
19255    /// The `value` of this channel can be a number or a string `"width"` for the width of the
19256    /// plot.
19257    #[serde(skip_serializing_if = "Option::is_none")]
19258    #[builder(default)]
19259    pub x2: Option<XUnion>,
19260    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
19261    /// `y2` or `height`.
19262    ///
19263    /// The `value` of this channel can be a number or a string `"height"` for the height of the
19264    /// plot.
19265    #[serde(skip_serializing_if = "Option::is_none")]
19266    #[builder(default)]
19267    pub y: Option<YUnion>,
19268    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
19269    ///
19270    /// The `value` of this channel can be a number or a string `"height"` for the height of the
19271    /// plot.
19272    #[serde(skip_serializing_if = "Option::is_none")]
19273    #[builder(default)]
19274    pub y2: Option<YUnion>,
19275    /// A flag for overlaying line on top of area marks, or an object defining the properties of
19276    /// the overlayed lines.
19277    ///
19278    /// - If this value is an empty object (`{}`) or `true`, lines with default properties will
19279    /// be used.
19280    ///
19281    /// - If this value is `false`, no lines would be automatically added to area marks.
19282    ///
19283    /// __Default value:__ `false`.
19284    #[serde(skip_serializing_if = "Option::is_none")]
19285    #[builder(default)]
19286    pub line: Option<Line>,
19287    /// A flag for overlaying points on top of line or area marks, or an object defining the
19288    /// properties of the overlayed points.
19289    ///
19290    /// - If this property is `"transparent"`, transparent points will be used (for enhancing
19291    /// tooltips and selections).
19292    ///
19293    /// - If this property is an empty object (`{}`) or `true`, filled points with default
19294    /// properties will be used.
19295    ///
19296    /// - If this property is `false`, no points would be automatically added to line or area
19297    /// marks.
19298    ///
19299    /// __Default value:__ `false`.
19300    #[serde(skip_serializing_if = "Option::is_none")]
19301    #[builder(default)]
19302    pub point: Option<PointUnion>,
19303    /// Offset between bars for binned field. The ideal value for this is either 0 (preferred by
19304    /// statisticians) or 1 (Vega-Lite default, D3 example style).
19305    ///
19306    /// __Default value:__ `1`
19307    #[serde(skip_serializing_if = "Option::is_none")]
19308    #[builder(default)]
19309    pub bin_spacing: Option<f64>,
19310    /// The default size of the bars on continuous scales.
19311    ///
19312    /// __Default value:__ `5`
19313    #[serde(skip_serializing_if = "Option::is_none")]
19314    #[builder(default)]
19315    pub continuous_band_size: Option<f64>,
19316    /// - For vertical bars, top-left and top-right corner radius.
19317    ///
19318    /// - For horizontal bars, top-right and bottom-right corner radius.
19319    #[serde(skip_serializing_if = "Option::is_none")]
19320    #[builder(default)]
19321    pub corner_radius_end: Option<CornerRadiusUnion>,
19322    /// The default size of the bars with discrete dimensions. If unspecified, the default size
19323    /// is  `step-2`, which provides 2 pixel offset between bars.
19324    #[serde(skip_serializing_if = "Option::is_none")]
19325    #[builder(default)]
19326    pub discrete_band_size: Option<DiscreteBandSize>,
19327    /// The minimum band size for bar and rectangle marks. __Default value:__ `0.25`
19328    #[serde(skip_serializing_if = "Option::is_none")]
19329    #[builder(default)]
19330    pub min_band_size: Option<CornerRadiusUnion>,
19331    /// The width of the ticks.
19332    ///
19333    /// __Default value:__  3/4 of step (width step for horizontal ticks and height step for
19334    /// vertical ticks).
19335    #[serde(skip_serializing_if = "Option::is_none")]
19336    #[builder(default)]
19337    pub band_size: Option<f64>,
19338    /// Thickness of the tick mark.
19339    ///
19340    /// __Default value:__  `1`
19341    #[serde(skip_serializing_if = "Option::is_none")]
19342    #[builder(default)]
19343    pub thickness: Option<f64>,
19344}
19345
19346#[derive(Debug, Clone, Serialize, Deserialize)]
19347#[serde(untagged)]
19348#[derive(From)]
19349pub enum BlendUnion {
19350    BackgroundExprRef(BackgroundExprRef),
19351    Enum(BlendEnum),
19352}
19353
19354#[derive(Debug, Clone, Serialize, Deserialize)]
19355#[serde(rename_all = "kebab-case")]
19356pub enum BlendEnum {
19357    Color,
19358    #[serde(rename = "color-burn")]
19359    ColorBurn,
19360    #[serde(rename = "color-dodge")]
19361    ColorDodge,
19362    Darken,
19363    Difference,
19364    Exclusion,
19365    #[serde(rename = "hard-light")]
19366    HardLight,
19367    Hue,
19368    Lighten,
19369    Luminosity,
19370    Multiply,
19371    Overlay,
19372    Saturation,
19373    Screen,
19374    #[serde(rename = "soft-light")]
19375    SoftLight,
19376}
19377
19378/// Default color.
19379///
19380/// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
19381///
19382/// __Note:__
19383/// - This property cannot be used in a [style
19384/// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
19385/// - The `fill` and `stroke` properties have higher precedence than `color` and will
19386/// override `color`.
19387#[derive(Debug, Clone, Serialize, Deserialize)]
19388#[serde(untagged)]
19389#[derive(From)]
19390pub enum MarkConfigColor {
19391    ColorLinearGradient(ColorLinearGradient),
19392    String(String),
19393}
19394
19395/// An expression for an array of raw values that, if non-null, directly overrides the
19396/// _domain_ property. This is useful for supporting interactions such as panning or zooming
19397/// a scale. The scale may be initially determined using a data-driven domain, then modified
19398/// in response to user input by setting the rawDomain value.
19399#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
19400#[builder(setter(into, strip_option))]
19401pub struct ColorLinearGradient {
19402    /// The type of gradient. Use `"linear"` for a linear gradient.
19403    ///
19404    /// The type of gradient. Use `"radial"` for a radial gradient.
19405    #[serde(skip_serializing_if = "Option::is_none")]
19406    #[builder(default)]
19407    pub gradient: Option<Gradient>,
19408    #[serde(skip_serializing_if = "Option::is_none")]
19409    #[builder(default)]
19410    pub id: Option<String>,
19411    /// An array of gradient stops defining the gradient color sequence.
19412    #[serde(skip_serializing_if = "Option::is_none")]
19413    #[builder(default)]
19414    pub stops: Option<Vec<GradientStop>>,
19415    /// The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
19416    ///
19417    /// __Default value:__ `0`
19418    ///
19419    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
19420    /// for the gradient.
19421    ///
19422    /// __Default value:__ `0.5`
19423    #[serde(skip_serializing_if = "Option::is_none")]
19424    #[builder(default)]
19425    pub x1: Option<f64>,
19426    /// The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
19427    ///
19428    /// __Default value:__ `1`
19429    ///
19430    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
19431    /// for the gradient.
19432    ///
19433    /// __Default value:__ `0.5`
19434    #[serde(skip_serializing_if = "Option::is_none")]
19435    #[builder(default)]
19436    pub x2: Option<f64>,
19437    /// The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
19438    ///
19439    /// __Default value:__ `0`
19440    ///
19441    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
19442    /// for the gradient.
19443    ///
19444    /// __Default value:__ `0.5`
19445    #[serde(skip_serializing_if = "Option::is_none")]
19446    #[builder(default)]
19447    pub y1: Option<f64>,
19448    /// The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
19449    ///
19450    /// __Default value:__ `0`
19451    ///
19452    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
19453    /// for the gradient.
19454    ///
19455    /// __Default value:__ `0.5`
19456    #[serde(skip_serializing_if = "Option::is_none")]
19457    #[builder(default)]
19458    pub y2: Option<f64>,
19459    /// The radius length, in normalized [0, 1] coordinates, of the inner circle for the
19460    /// gradient.
19461    ///
19462    /// __Default value:__ `0`
19463    #[serde(skip_serializing_if = "Option::is_none")]
19464    #[builder(default)]
19465    pub r1: Option<f64>,
19466    /// The radius length, in normalized [0, 1] coordinates, of the outer circle for the
19467    /// gradient.
19468    ///
19469    /// __Default value:__ `0.5`
19470    #[serde(skip_serializing_if = "Option::is_none")]
19471    #[builder(default)]
19472    pub r2: Option<f64>,
19473    /// Vega expression (which can refer to Vega-Lite parameters).
19474    #[serde(skip_serializing_if = "Option::is_none")]
19475    #[builder(default)]
19476    pub expr: Option<String>,
19477}
19478
19479#[derive(Debug, Clone, Serialize, Deserialize)]
19480#[serde(untagged)]
19481#[derive(From)]
19482pub enum CursorUnion {
19483    BackgroundExprRef(BackgroundExprRef),
19484    Enum(Cursor),
19485}
19486
19487/// The mouse cursor used over the mark. Any valid [CSS cursor
19488/// type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
19489///
19490/// The mouse cursor used over the interval mark. Any valid [CSS cursor
19491/// type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
19492///
19493/// The mouse cursor used over the view. Any valid [CSS cursor
19494/// type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
19495#[derive(Debug, Clone, Serialize, Deserialize)]
19496#[serde(rename_all = "kebab-case")]
19497pub enum Cursor {
19498    Alias,
19499    #[serde(rename = "all-scroll")]
19500    AllScroll,
19501    Auto,
19502    Cell,
19503    #[serde(rename = "col-resize")]
19504    ColResize,
19505    #[serde(rename = "context-menu")]
19506    ContextMenu,
19507    Copy,
19508    Crosshair,
19509    Default,
19510    #[serde(rename = "e-resize")]
19511    EResize,
19512    #[serde(rename = "ew-resize")]
19513    EwResize,
19514    Grab,
19515    Grabbing,
19516    Help,
19517    Move,
19518    #[serde(rename = "n-resize")]
19519    NResize,
19520    #[serde(rename = "ne-resize")]
19521    NeResize,
19522    #[serde(rename = "nesw-resize")]
19523    NeswResize,
19524    #[serde(rename = "no-drop")]
19525    NoDrop,
19526    None,
19527    #[serde(rename = "not-allowed")]
19528    NotAllowed,
19529    #[serde(rename = "ns-resize")]
19530    NsResize,
19531    #[serde(rename = "nw-resize")]
19532    NwResize,
19533    #[serde(rename = "nwse-resize")]
19534    NwseResize,
19535    Pointer,
19536    Progress,
19537    #[serde(rename = "row-resize")]
19538    RowResize,
19539    #[serde(rename = "s-resize")]
19540    SResize,
19541    #[serde(rename = "se-resize")]
19542    SeResize,
19543    #[serde(rename = "sw-resize")]
19544    SwResize,
19545    Text,
19546    #[serde(rename = "vertical-text")]
19547    VerticalText,
19548    #[serde(rename = "w-resize")]
19549    WResize,
19550    Wait,
19551    #[serde(rename = "zoom-in")]
19552    ZoomIn,
19553    #[serde(rename = "zoom-out")]
19554    ZoomOut,
19555}
19556
19557#[derive(Debug, Clone, Serialize, Deserialize)]
19558#[serde(untagged)]
19559#[derive(From)]
19560pub enum Dir {
19561    BackgroundExprRef(BackgroundExprRef),
19562    Enum(TextDirection),
19563}
19564
19565/// The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left).
19566/// This property determines on which side is truncated in response to the limit parameter.
19567///
19568/// __Default value:__ `"ltr"`
19569#[derive(Debug, Clone, Serialize, Deserialize)]
19570#[serde(rename_all = "snake_case")]
19571pub enum TextDirection {
19572    Ltr,
19573    Rtl,
19574}
19575
19576#[derive(Debug, Clone, Serialize, Deserialize)]
19577#[serde(untagged)]
19578#[derive(From)]
19579pub enum DiscreteBandSize {
19580    Double(f64),
19581    RelativeBandSize(RelativeBandSize),
19582}
19583
19584#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
19585#[builder(setter(into, strip_option))]
19586pub struct RelativeBandSize {
19587    /// The relative band size.  For example `0.5` means half of the band scale's band width.
19588    #[serde(skip_serializing_if = "Option::is_none")]
19589    #[builder(default)]
19590    pub band: Option<f64>,
19591}
19592
19593#[derive(Debug, Clone, Serialize, Deserialize)]
19594#[serde(untagged)]
19595#[derive(From)]
19596pub enum MarkConfigFill {
19597    FillLinearGradient(FillLinearGradient),
19598    String(String),
19599}
19600
19601/// An expression for an array of raw values that, if non-null, directly overrides the
19602/// _domain_ property. This is useful for supporting interactions such as panning or zooming
19603/// a scale. The scale may be initially determined using a data-driven domain, then modified
19604/// in response to user input by setting the rawDomain value.
19605#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
19606#[builder(setter(into, strip_option))]
19607pub struct FillLinearGradient {
19608    /// The type of gradient. Use `"linear"` for a linear gradient.
19609    ///
19610    /// The type of gradient. Use `"radial"` for a radial gradient.
19611    #[serde(skip_serializing_if = "Option::is_none")]
19612    #[builder(default)]
19613    pub gradient: Option<Gradient>,
19614    #[serde(skip_serializing_if = "Option::is_none")]
19615    #[builder(default)]
19616    pub id: Option<String>,
19617    /// An array of gradient stops defining the gradient color sequence.
19618    #[serde(skip_serializing_if = "Option::is_none")]
19619    #[builder(default)]
19620    pub stops: Option<Vec<GradientStop>>,
19621    /// The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
19622    ///
19623    /// __Default value:__ `0`
19624    ///
19625    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
19626    /// for the gradient.
19627    ///
19628    /// __Default value:__ `0.5`
19629    #[serde(skip_serializing_if = "Option::is_none")]
19630    #[builder(default)]
19631    pub x1: Option<f64>,
19632    /// The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
19633    ///
19634    /// __Default value:__ `1`
19635    ///
19636    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
19637    /// for the gradient.
19638    ///
19639    /// __Default value:__ `0.5`
19640    #[serde(skip_serializing_if = "Option::is_none")]
19641    #[builder(default)]
19642    pub x2: Option<f64>,
19643    /// The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
19644    ///
19645    /// __Default value:__ `0`
19646    ///
19647    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
19648    /// for the gradient.
19649    ///
19650    /// __Default value:__ `0.5`
19651    #[serde(skip_serializing_if = "Option::is_none")]
19652    #[builder(default)]
19653    pub y1: Option<f64>,
19654    /// The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
19655    ///
19656    /// __Default value:__ `0`
19657    ///
19658    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
19659    /// for the gradient.
19660    ///
19661    /// __Default value:__ `0.5`
19662    #[serde(skip_serializing_if = "Option::is_none")]
19663    #[builder(default)]
19664    pub y2: Option<f64>,
19665    /// The radius length, in normalized [0, 1] coordinates, of the inner circle for the
19666    /// gradient.
19667    ///
19668    /// __Default value:__ `0`
19669    #[serde(skip_serializing_if = "Option::is_none")]
19670    #[builder(default)]
19671    pub r1: Option<f64>,
19672    /// The radius length, in normalized [0, 1] coordinates, of the outer circle for the
19673    /// gradient.
19674    ///
19675    /// __Default value:__ `0.5`
19676    #[serde(skip_serializing_if = "Option::is_none")]
19677    #[builder(default)]
19678    pub r2: Option<f64>,
19679    /// Vega expression (which can refer to Vega-Lite parameters).
19680    #[serde(skip_serializing_if = "Option::is_none")]
19681    #[builder(default)]
19682    pub expr: Option<String>,
19683}
19684
19685#[derive(Debug, Clone, Serialize, Deserialize)]
19686#[serde(untagged)]
19687#[derive(From)]
19688pub enum Opacity {
19689    BackgroundExprRef(BackgroundExprRef),
19690    Double(f64),
19691}
19692
19693#[derive(Debug, Clone, Serialize, Deserialize)]
19694#[serde(untagged)]
19695#[derive(From)]
19696pub enum MarkConfigInterpolate {
19697    BackgroundExprRef(BackgroundExprRef),
19698    Enum(Interpolate),
19699}
19700
19701/// The line interpolation method to use for line and area marks. One of the following:
19702/// - `"linear"`: piecewise linear segments, as in a polyline.
19703/// - `"linear-closed"`: close the linear segments to form a polygon.
19704/// - `"step"`: alternate between horizontal and vertical segments, as in a step function.
19705/// - `"step-before"`: alternate between vertical and horizontal segments, as in a step
19706/// function.
19707/// - `"step-after"`: alternate between horizontal and vertical segments, as in a step
19708/// function.
19709/// - `"basis"`: a B-spline, with control point duplication on the ends.
19710/// - `"basis-open"`: an open B-spline; may not intersect the start or end.
19711/// - `"basis-closed"`: a closed B-spline, as in a loop.
19712/// - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
19713/// - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
19714/// will intersect other control points.
19715/// - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
19716/// - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
19717/// spline.
19718/// - `"monotone"`: cubic interpolation that preserves monotonicity in y.
19719///
19720/// The line interpolation method for the error band. One of the following:
19721/// - `"linear"`: piecewise linear segments, as in a polyline.
19722/// - `"linear-closed"`: close the linear segments to form a polygon.
19723/// - `"step"`: a piecewise constant function (a step function) consisting of alternating
19724/// horizontal and vertical lines. The y-value changes at the midpoint of each pair of
19725/// adjacent x-values.
19726/// - `"step-before"`: a piecewise constant function (a step function) consisting of
19727/// alternating horizontal and vertical lines. The y-value changes before the x-value.
19728/// - `"step-after"`: a piecewise constant function (a step function) consisting of
19729/// alternating horizontal and vertical lines. The y-value changes after the x-value.
19730/// - `"basis"`: a B-spline, with control point duplication on the ends.
19731/// - `"basis-open"`: an open B-spline; may not intersect the start or end.
19732/// - `"basis-closed"`: a closed B-spline, as in a loop.
19733/// - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
19734/// - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
19735/// will intersect other control points.
19736/// - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
19737/// - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
19738/// spline.
19739/// - `"monotone"`: cubic interpolation that preserves monotonicity in y.
19740#[derive(Debug, Clone, Serialize, Deserialize)]
19741#[serde(rename_all = "kebab-case")]
19742pub enum Interpolate {
19743    Basis,
19744    #[serde(rename = "basis-closed")]
19745    BasisClosed,
19746    #[serde(rename = "basis-open")]
19747    BasisOpen,
19748    Bundle,
19749    Cardinal,
19750    #[serde(rename = "cardinal-closed")]
19751    CardinalClosed,
19752    #[serde(rename = "cardinal-open")]
19753    CardinalOpen,
19754    #[serde(rename = "catmull-rom")]
19755    CatmullRom,
19756    Linear,
19757    #[serde(rename = "linear-closed")]
19758    LinearClosed,
19759    Monotone,
19760    Natural,
19761    Step,
19762    #[serde(rename = "step-after")]
19763    StepAfter,
19764    #[serde(rename = "step-before")]
19765    StepBefore,
19766}
19767
19768#[derive(Debug, Clone, Serialize, Deserialize)]
19769#[serde(rename_all = "kebab-case")]
19770pub enum MarkInvalidDataMode {
19771    #[serde(rename = "break-paths-filter-domains")]
19772    BreakPathsFilterDomains,
19773    #[serde(rename = "break-paths-show-domains")]
19774    BreakPathsShowDomains,
19775    #[serde(rename = "break-paths-show-path-domains")]
19776    BreakPathsShowPathDomains,
19777    Filter,
19778    Show,
19779}
19780
19781#[derive(Debug, Clone, Serialize, Deserialize)]
19782#[serde(untagged)]
19783#[derive(From)]
19784pub enum Line {
19785    Bool(bool),
19786    OverlayMarkDef(OverlayMarkDef),
19787}
19788
19789#[derive(Debug, Clone, Serialize, Deserialize)]
19790#[serde(rename_all = "camelCase")]
19791#[derive(Default, Builder)]
19792#[builder(setter(into, strip_option))]
19793pub struct OverlayMarkDef {
19794    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
19795    /// of `"left"`, `"right"`, `"center"`.
19796    ///
19797    /// __Note:__ Expression reference is *not* supported for range marks.
19798    #[serde(skip_serializing_if = "Option::is_none")]
19799    #[builder(default)]
19800    pub align: Option<TitleAlignUnion>,
19801    #[serde(skip_serializing_if = "Option::is_none")]
19802    #[builder(default)]
19803    pub angle: Option<Angle>,
19804    #[serde(skip_serializing_if = "Option::is_none")]
19805    #[builder(default)]
19806    pub aria: Option<Aria>,
19807    #[serde(skip_serializing_if = "Option::is_none")]
19808    #[builder(default)]
19809    pub aria_role: Option<Box<Color>>,
19810    #[serde(skip_serializing_if = "Option::is_none")]
19811    #[builder(default)]
19812    pub aria_role_description: Option<Box<Color>>,
19813    #[serde(skip_serializing_if = "Option::is_none")]
19814    #[builder(default)]
19815    pub aspect: Option<Aria>,
19816    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
19817    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
19818    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
19819    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
19820    /// rather than `fontSize` alone.
19821    ///
19822    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
19823    /// `"bottom"`.
19824    ///
19825    /// __Note:__ Expression reference is *not* supported for range marks.
19826    #[serde(skip_serializing_if = "Option::is_none")]
19827    #[builder(default)]
19828    pub baseline: Option<TextBaseline>,
19829    #[serde(skip_serializing_if = "Option::is_none")]
19830    #[builder(default)]
19831    pub blend: Option<BlendUnion>,
19832    /// Whether a mark be clipped to the enclosing group’s width and height.
19833    #[serde(skip_serializing_if = "Option::is_none")]
19834    #[builder(default)]
19835    pub clip: Option<Aria>,
19836    /// Default color.
19837    ///
19838    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
19839    ///
19840    /// __Note:__
19841    /// - This property cannot be used in a [style
19842    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
19843    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
19844    /// override `color`.
19845    #[serde(skip_serializing_if = "Option::is_none")]
19846    #[builder(default)]
19847    pub color: Option<MarkConfigColor>,
19848    #[serde(skip_serializing_if = "Option::is_none")]
19849    #[builder(default)]
19850    pub corner_radius: Option<CornerRadiusUnion>,
19851    #[serde(skip_serializing_if = "Option::is_none")]
19852    #[builder(default)]
19853    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
19854    #[serde(skip_serializing_if = "Option::is_none")]
19855    #[builder(default)]
19856    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
19857    #[serde(skip_serializing_if = "Option::is_none")]
19858    #[builder(default)]
19859    pub corner_radius_top_left: Option<CornerRadiusUnion>,
19860    #[serde(skip_serializing_if = "Option::is_none")]
19861    #[builder(default)]
19862    pub corner_radius_top_right: Option<CornerRadiusUnion>,
19863    #[serde(skip_serializing_if = "Option::is_none")]
19864    #[builder(default)]
19865    pub cursor: Option<CursorUnion>,
19866    #[serde(skip_serializing_if = "Option::is_none")]
19867    #[builder(default)]
19868    pub description: Option<Box<Color>>,
19869    #[serde(skip_serializing_if = "Option::is_none")]
19870    #[builder(default)]
19871    pub dir: Option<Dir>,
19872    #[serde(skip_serializing_if = "Option::is_none")]
19873    #[builder(default)]
19874    pub dx: Option<CornerRadiusUnion>,
19875    #[serde(skip_serializing_if = "Option::is_none")]
19876    #[builder(default)]
19877    pub dy: Option<CornerRadiusUnion>,
19878    #[serde(skip_serializing_if = "Option::is_none")]
19879    #[builder(default)]
19880    pub ellipsis: Option<Box<Color>>,
19881    #[serde(skip_serializing_if = "Option::is_none")]
19882    #[builder(default)]
19883    pub end_angle: Option<CornerRadiusUnion>,
19884    /// Default fill color. This property has higher precedence than `config.color`. Set to
19885    /// `null` to remove fill.
19886    ///
19887    /// __Default value:__ (None)
19888    #[serde(skip_serializing_if = "Option::is_none")]
19889    #[builder(default)]
19890    pub fill: Option<MarkConfigFill>,
19891    /// Whether the mark's color should be used as fill color instead of stroke color.
19892    ///
19893    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
19894    /// `geoshape` marks for
19895    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
19896    /// otherwise, `true`.
19897    ///
19898    /// __Note:__ This property cannot be used in a [style
19899    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
19900    #[serde(skip_serializing_if = "Option::is_none")]
19901    #[builder(default)]
19902    pub filled: Option<bool>,
19903    #[serde(skip_serializing_if = "Option::is_none")]
19904    #[builder(default)]
19905    pub fill_opacity: Option<Opacity>,
19906    #[serde(skip_serializing_if = "Option::is_none")]
19907    #[builder(default)]
19908    pub font: Option<Box<Color>>,
19909    #[serde(skip_serializing_if = "Option::is_none")]
19910    #[builder(default)]
19911    pub font_size: Option<FontSize>,
19912    #[serde(skip_serializing_if = "Option::is_none")]
19913    #[builder(default)]
19914    pub font_style: Option<Box<Color>>,
19915    #[serde(skip_serializing_if = "Option::is_none")]
19916    #[builder(default)]
19917    pub font_weight: Option<FontWeightUnion>,
19918    #[serde(skip_serializing_if = "Option::is_none")]
19919    #[builder(default)]
19920    pub height: Option<CornerRadiusUnion>,
19921    #[serde(skip_serializing_if = "Option::is_none")]
19922    #[builder(default)]
19923    pub href: Option<Box<Color>>,
19924    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
19925    ///
19926    /// __Default value:__ `0`
19927    #[serde(skip_serializing_if = "Option::is_none")]
19928    #[builder(default)]
19929    pub inner_radius: Option<CornerRadiusUnion>,
19930    #[serde(skip_serializing_if = "Option::is_none")]
19931    #[builder(default)]
19932    pub interpolate: Option<MarkConfigInterpolate>,
19933    /// Invalid data mode, which defines how the marks and corresponding scales should represent
19934    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
19935    /// invalid values).
19936    ///
19937    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
19938    /// *scales*. For path marks (for line, area, trail), this option will create paths that
19939    /// connect valid points, as if the data rows with invalid values do not exist.
19940    ///
19941    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
19942    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
19943    /// *exclude* these filtered data points.
19944    ///
19945    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
19946    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
19947    /// data points (for both path and non-path marks).
19948    ///
19949    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
19950    /// will use the output for invalid values defined in `config.scale.invalid` or, if
19951    /// unspecified, by default invalid values will produce the same visual values as zero (if
19952    /// the scale includes zero) or the minimum value (if the scale does not include zero).
19953    ///
19954    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
19955    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
19956    /// non-path marks.
19957    ///
19958    /// __Note__: If any channel's scale has an output for invalid values defined in
19959    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
19960    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
19961    /// be filtered and will not cause path breaks.
19962    #[serde(skip_serializing_if = "Option::is_none")]
19963    #[builder(default)]
19964    pub invalid: Option<MarkInvalidDataMode>,
19965    #[serde(skip_serializing_if = "Option::is_none")]
19966    #[builder(default)]
19967    pub limit: Option<CornerRadiusUnion>,
19968    #[serde(skip_serializing_if = "Option::is_none")]
19969    #[builder(default)]
19970    pub line_break: Option<Box<Color>>,
19971    #[serde(skip_serializing_if = "Option::is_none")]
19972    #[builder(default)]
19973    pub line_height: Option<CornerRadiusUnion>,
19974    /// The overall opacity (value between [0,1]).
19975    ///
19976    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
19977    /// `square` marks or layered `bar` charts and `1` otherwise.
19978    #[serde(skip_serializing_if = "Option::is_none")]
19979    #[builder(default)]
19980    pub opacity: Option<CornerRadiusUnion>,
19981    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
19982    /// the lines use the original order in the data sources.
19983    #[serde(skip_serializing_if = "Option::is_none")]
19984    #[builder(default)]
19985    pub order: Option<bool>,
19986    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
19987    /// horizontal (default) or vertical.
19988    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
19989    /// applied to x or y dimension.
19990    /// - For area, this property determines the orient property of the Vega output.
19991    /// - For line and trail marks, this property determines the sort order of the points in the
19992    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
19993    /// determined by the orientation of the stack; therefore explicitly specified value will be
19994    /// ignored.
19995    #[serde(skip_serializing_if = "Option::is_none")]
19996    #[builder(default)]
19997    pub orient: Option<Orientation>,
19998    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
19999    ///
20000    /// __Default value:__ `0`
20001    #[serde(skip_serializing_if = "Option::is_none")]
20002    #[builder(default)]
20003    pub outer_radius: Option<CornerRadiusUnion>,
20004    #[serde(skip_serializing_if = "Option::is_none")]
20005    #[builder(default)]
20006    pub pad_angle: Option<CornerRadiusUnion>,
20007    /// For arc mark, the primary (outer) radius in pixels.
20008    ///
20009    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
20010    /// determined by the `x` and `y` properties.
20011    ///
20012    /// __Default value:__ `min(plot_width, plot_height)/2`
20013    #[serde(skip_serializing_if = "Option::is_none")]
20014    #[builder(default)]
20015    pub radius: Option<CornerRadiusUnion>,
20016    /// The secondary (inner) radius in pixels of arc marks.
20017    ///
20018    /// __Default value:__ `0`
20019    #[serde(skip_serializing_if = "Option::is_none")]
20020    #[builder(default)]
20021    pub radius2: Option<CornerRadiusUnion>,
20022    /// Offset for radius2.
20023    #[serde(skip_serializing_if = "Option::is_none")]
20024    #[builder(default)]
20025    pub radius2_offset: Option<CornerRadiusUnion>,
20026    /// Offset for radius.
20027    #[serde(skip_serializing_if = "Option::is_none")]
20028    #[builder(default)]
20029    pub radius_offset: Option<CornerRadiusUnion>,
20030    #[serde(skip_serializing_if = "Option::is_none")]
20031    #[builder(default)]
20032    pub shape: Option<Box<Color>>,
20033    /// Default size for marks.
20034    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
20035    /// this value sets the area of the symbol; the side lengths will increase with the square
20036    /// root of this value.
20037    /// - For `bar`, this represents the band size of the bar, in pixels.
20038    /// - For `text`, this represents the font size, in pixels.
20039    ///
20040    /// __Default value:__
20041    /// - `30` for point, circle, square marks; width/height's `step`
20042    /// - `2` for bar marks with discrete dimensions;
20043    /// - `5` for bar marks with continuous dimensions;
20044    /// - `11` for text marks.
20045    #[serde(skip_serializing_if = "Option::is_none")]
20046    #[builder(default)]
20047    pub size: Option<CornerRadiusUnion>,
20048    #[serde(skip_serializing_if = "Option::is_none")]
20049    #[builder(default)]
20050    pub smooth: Option<Aria>,
20051    #[serde(skip_serializing_if = "Option::is_none")]
20052    #[builder(default)]
20053    pub start_angle: Option<CornerRadiusUnion>,
20054    /// Default stroke color. This property has higher precedence than `config.color`. Set to
20055    /// `null` to remove stroke.
20056    ///
20057    /// __Default value:__ (None)
20058    #[serde(skip_serializing_if = "Option::is_none")]
20059    #[builder(default)]
20060    pub stroke: Option<MarkConfigFill>,
20061    #[serde(skip_serializing_if = "Option::is_none")]
20062    #[builder(default)]
20063    pub stroke_cap: Option<Cap>,
20064    #[serde(skip_serializing_if = "Option::is_none")]
20065    #[builder(default)]
20066    pub stroke_dash: Option<StrokeDashUnion>,
20067    #[serde(skip_serializing_if = "Option::is_none")]
20068    #[builder(default)]
20069    pub stroke_dash_offset: Option<CornerRadiusUnion>,
20070    #[serde(skip_serializing_if = "Option::is_none")]
20071    #[builder(default)]
20072    pub stroke_join: Option<StrokeJoinUnion>,
20073    #[serde(skip_serializing_if = "Option::is_none")]
20074    #[builder(default)]
20075    pub stroke_miter_limit: Option<CornerRadiusUnion>,
20076    #[serde(skip_serializing_if = "Option::is_none")]
20077    #[builder(default)]
20078    pub stroke_offset: Option<CornerRadiusUnion>,
20079    #[serde(skip_serializing_if = "Option::is_none")]
20080    #[builder(default)]
20081    pub stroke_opacity: Option<Opacity>,
20082    #[serde(skip_serializing_if = "Option::is_none")]
20083    #[builder(default)]
20084    pub stroke_width: Option<FontSize>,
20085    /// A string or array of strings indicating the name of custom styles to apply to the mark. A
20086    /// style is a named collection of mark property defaults defined within the [style
20087    /// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
20088    /// an array, later styles will override earlier styles. Any [mark
20089    /// properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly
20090    /// defined within the `encoding` will override a style default.
20091    ///
20092    /// __Default value:__ The mark's name. For example, a bar mark will have style `"bar"` by
20093    /// default. __Note:__ Any specified style will augment the default style. For example, a bar
20094    /// mark with `"style": "foo"` will receive from `config.style.bar` and `config.style.foo`
20095    /// (the specified style `"foo"` has higher precedence).
20096    #[serde(skip_serializing_if = "Option::is_none")]
20097    #[builder(default)]
20098    pub style: Option<LegendText>,
20099    #[serde(skip_serializing_if = "Option::is_none")]
20100    #[builder(default)]
20101    pub tension: Option<CornerRadiusUnion>,
20102    #[serde(skip_serializing_if = "Option::is_none")]
20103    #[builder(default)]
20104    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
20105    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
20106    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
20107    /// clockwise.)
20108    ///
20109    /// - For text marks, polar coordinate angle in radians.
20110    #[serde(skip_serializing_if = "Option::is_none")]
20111    #[builder(default)]
20112    pub theta: Option<CornerRadiusUnion>,
20113    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
20114    /// values proceed clockwise.
20115    #[serde(skip_serializing_if = "Option::is_none")]
20116    #[builder(default)]
20117    pub theta2: Option<CornerRadiusUnion>,
20118    /// Offset for theta2.
20119    #[serde(skip_serializing_if = "Option::is_none")]
20120    #[builder(default)]
20121    pub theta2_offset: Option<CornerRadiusUnion>,
20122    /// Offset for theta.
20123    #[serde(skip_serializing_if = "Option::is_none")]
20124    #[builder(default)]
20125    pub theta_offset: Option<CornerRadiusUnion>,
20126    #[serde(skip_serializing_if = "Option::is_none")]
20127    #[builder(default)]
20128    pub time: Option<CornerRadiusUnion>,
20129    /// Default relative band position for a time unit. If set to `0`, the marks will be
20130    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
20131    /// be positioned in the middle of the time unit band step.
20132    #[serde(skip_serializing_if = "Option::is_none")]
20133    #[builder(default)]
20134    pub time_unit_band_position: Option<f64>,
20135    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
20136    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
20137    /// half of the time unit band step.
20138    #[serde(skip_serializing_if = "Option::is_none")]
20139    #[builder(default)]
20140    pub time_unit_band_size: Option<f64>,
20141    /// The tooltip text string to show upon mouse hover or an object defining which fields
20142    /// should the tooltip be derived from.
20143    ///
20144    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
20145    /// will be used.
20146    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
20147    /// data point will be used.
20148    /// - If set to `null` or `false`, then no tooltip will be used.
20149    ///
20150    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
20151    /// a detailed discussion about tooltip  in Vega-Lite.
20152    ///
20153    /// __Default value:__ `null`
20154    #[serde(skip_serializing_if = "Option::is_none")]
20155    #[builder(default)]
20156    pub tooltip: Option<OverlayMarkDefTooltip>,
20157    #[serde(skip_serializing_if = "Option::is_none")]
20158    #[builder(default)]
20159    pub url: Option<Box<Color>>,
20160    #[serde(skip_serializing_if = "Option::is_none")]
20161    #[builder(default)]
20162    pub width: Option<CornerRadiusUnion>,
20163    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
20164    /// `x2` or `width`.
20165    ///
20166    /// The `value` of this channel can be a number or a string `"width"` for the width of the
20167    /// plot.
20168    #[serde(skip_serializing_if = "Option::is_none")]
20169    #[builder(default)]
20170    pub x: Option<XUnion>,
20171    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
20172    ///
20173    /// The `value` of this channel can be a number or a string `"width"` for the width of the
20174    /// plot.
20175    #[serde(skip_serializing_if = "Option::is_none")]
20176    #[builder(default)]
20177    pub x2: Option<XUnion>,
20178    /// Offset for x2-position.
20179    #[serde(skip_serializing_if = "Option::is_none")]
20180    #[builder(default)]
20181    pub x2_offset: Option<CornerRadiusUnion>,
20182    /// Offset for x-position.
20183    #[serde(skip_serializing_if = "Option::is_none")]
20184    #[builder(default)]
20185    pub x_offset: Option<CornerRadiusUnion>,
20186    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
20187    /// `y2` or `height`.
20188    ///
20189    /// The `value` of this channel can be a number or a string `"height"` for the height of the
20190    /// plot.
20191    #[serde(skip_serializing_if = "Option::is_none")]
20192    #[builder(default)]
20193    pub y: Option<YUnion>,
20194    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
20195    ///
20196    /// The `value` of this channel can be a number or a string `"height"` for the height of the
20197    /// plot.
20198    #[serde(skip_serializing_if = "Option::is_none")]
20199    #[builder(default)]
20200    pub y2: Option<YUnion>,
20201    /// Offset for y2-position.
20202    #[serde(skip_serializing_if = "Option::is_none")]
20203    #[builder(default)]
20204    pub y2_offset: Option<CornerRadiusUnion>,
20205    /// Offset for y-position.
20206    #[serde(skip_serializing_if = "Option::is_none")]
20207    #[builder(default)]
20208    pub y_offset: Option<CornerRadiusUnion>,
20209}
20210
20211#[derive(Debug, Clone, Serialize, Deserialize)]
20212#[serde(untagged)]
20213#[derive(From)]
20214pub enum StrokeJoinUnion {
20215    BackgroundExprRef(BackgroundExprRef),
20216    Enum(StrokeJoin),
20217}
20218
20219/// The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.
20220///
20221/// __Default value:__ `"miter"`
20222#[derive(Debug, Clone, Serialize, Deserialize)]
20223#[serde(rename_all = "snake_case")]
20224pub enum StrokeJoin {
20225    Bevel,
20226    Miter,
20227    Round,
20228}
20229
20230#[derive(Debug, Clone, Serialize, Deserialize)]
20231#[serde(untagged)]
20232#[derive(From)]
20233pub enum OverlayMarkDefTooltip {
20234    Bool(bool),
20235    Double(f64),
20236    String(String),
20237    TooltipContent(TooltipContent),
20238}
20239
20240/// An expression for an array of raw values that, if non-null, directly overrides the
20241/// _domain_ property. This is useful for supporting interactions such as panning or zooming
20242/// a scale. The scale may be initially determined using a data-driven domain, then modified
20243/// in response to user input by setting the rawDomain value.
20244#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20245#[builder(setter(into, strip_option))]
20246pub struct TooltipContent {
20247    #[serde(skip_serializing_if = "Option::is_none")]
20248    #[builder(default)]
20249    pub content: Option<Content>,
20250    /// Vega expression (which can refer to Vega-Lite parameters).
20251    #[serde(skip_serializing_if = "Option::is_none")]
20252    #[builder(default)]
20253    pub expr: Option<String>,
20254}
20255
20256#[derive(Debug, Clone, Serialize, Deserialize)]
20257#[serde(rename_all = "snake_case")]
20258pub enum Content {
20259    Data,
20260    Encoding,
20261}
20262
20263#[derive(Debug, Clone, Serialize, Deserialize)]
20264#[serde(untagged)]
20265#[derive(From)]
20266pub enum XUnion {
20267    BackgroundExprRef(BackgroundExprRef),
20268    Double(f64),
20269    Enum(XEnum),
20270}
20271
20272#[derive(Debug, Clone, Serialize, Deserialize)]
20273#[serde(rename_all = "snake_case")]
20274pub enum XEnum {
20275    Width,
20276}
20277
20278#[derive(Debug, Clone, Serialize, Deserialize)]
20279#[serde(untagged)]
20280#[derive(From)]
20281pub enum YUnion {
20282    BackgroundExprRef(BackgroundExprRef),
20283    Double(f64),
20284    Enum(YEnum),
20285}
20286
20287#[derive(Debug, Clone, Serialize, Deserialize)]
20288#[serde(rename_all = "snake_case")]
20289pub enum YEnum {
20290    Height,
20291}
20292
20293#[derive(Debug, Clone, Serialize, Deserialize)]
20294#[serde(untagged)]
20295#[derive(From)]
20296pub enum PointUnion {
20297    Bool(bool),
20298    Enum(PointEnum),
20299    OverlayMarkDef(OverlayMarkDef),
20300}
20301
20302#[derive(Debug, Clone, Serialize, Deserialize)]
20303#[serde(rename_all = "snake_case")]
20304pub enum PointEnum {
20305    Transparent,
20306}
20307
20308/// The mark type. This could a primitive mark type (one of `"bar"`, `"circle"`, `"square"`,
20309/// `"tick"`, `"line"`, `"area"`, `"point"`, `"geoshape"`, `"rule"`, and `"text"`) or a
20310/// composite mark type (`"boxplot"`, `"errorband"`, `"errorbar"`).
20311///
20312/// All types of primitive marks.
20313#[derive(Debug, Clone, Serialize, Deserialize)]
20314#[serde(rename_all = "snake_case")]
20315pub enum Mark {
20316    Arc,
20317    Area,
20318    Bar,
20319    Boxplot,
20320    Circle,
20321    Errorband,
20322    Errorbar,
20323    Geoshape,
20324    Image,
20325    Line,
20326    Point,
20327    Rect,
20328    Rule,
20329    Square,
20330    Text,
20331    Tick,
20332    Trail,
20333}
20334
20335#[derive(Debug, Clone, Serialize, Deserialize)]
20336#[serde(untagged)]
20337#[derive(From)]
20338pub enum MarkDefExtent {
20339    Double(f64),
20340    Enum(ExtentExtent),
20341}
20342
20343/// The extent of the band. Available options include:
20344/// - `"ci"`: Extend the band to the 95% bootstrapped confidence interval of the mean.
20345/// - `"stderr"`: The size of band are set to the value of standard error, extending from the
20346/// mean.
20347/// - `"stdev"`: The size of band are set to the value of standard deviation, extending from
20348/// the mean.
20349/// - `"iqr"`: Extend the band to the q1 and q3.
20350///
20351/// __Default value:__ `"stderr"`.
20352///
20353/// The extent of the rule. Available options include:
20354/// - `"ci"`: Extend the rule to the 95% bootstrapped confidence interval of the mean.
20355/// - `"stderr"`: The size of rule are set to the value of standard error, extending from the
20356/// mean.
20357/// - `"stdev"`: The size of rule are set to the value of standard deviation, extending from
20358/// the mean.
20359/// - `"iqr"`: Extend the rule to the q1 and q3.
20360///
20361/// __Default value:__ `"stderr"`.
20362#[derive(Debug, Clone, Serialize, Deserialize)]
20363#[serde(rename_all = "kebab-case")]
20364pub enum ExtentExtent {
20365    Ci,
20366    Iqr,
20367    #[serde(rename = "min-max")]
20368    MinMax,
20369    Stderr,
20370    Stdev,
20371}
20372
20373#[derive(Debug, Clone, Serialize, Deserialize)]
20374#[serde(untagged)]
20375#[derive(From)]
20376pub enum BoxPlotDefHeight {
20377    Double(f64),
20378    RelativeBandSizeClass(RelativeBandSizeClass),
20379}
20380
20381/// An expression for an array of raw values that, if non-null, directly overrides the
20382/// _domain_ property. This is useful for supporting interactions such as panning or zooming
20383/// a scale. The scale may be initially determined using a data-driven domain, then modified
20384/// in response to user input by setting the rawDomain value.
20385#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20386#[builder(setter(into, strip_option))]
20387pub struct RelativeBandSizeClass {
20388    /// Vega expression (which can refer to Vega-Lite parameters).
20389    #[serde(skip_serializing_if = "Option::is_none")]
20390    #[builder(default)]
20391    pub expr: Option<String>,
20392    /// The relative band size.  For example `0.5` means half of the band scale's band width.
20393    #[serde(skip_serializing_if = "Option::is_none")]
20394    #[builder(default)]
20395    pub band: Option<f64>,
20396}
20397
20398#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20399#[builder(setter(into, strip_option))]
20400pub struct SelectionParameter {
20401    /// When set, a selection is populated by input elements (also known as dynamic query
20402    /// widgets) or by interacting with the corresponding legend. Direct manipulation interaction
20403    /// is disabled by default; to re-enable it, set the selection's
20404    /// [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties)
20405    /// property.
20406    ///
20407    /// Legend bindings are restricted to selections that only specify a single field or
20408    /// encoding.
20409    ///
20410    /// Query widget binding takes the form of Vega's [input element binding
20411    /// definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between
20412    /// projected field/encodings and binding definitions.
20413    ///
20414    /// __See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.
20415    #[serde(skip_serializing_if = "Option::is_none")]
20416    #[builder(default)]
20417    pub bind: Option<ParamBind>,
20418    /// Required. A unique name for the selection parameter. Selection names should be valid
20419    /// JavaScript identifiers: they should contain only alphanumeric characters (or "$", or "_")
20420    /// and may not start with a digit. Reserved keywords that may not be used as parameter names
20421    /// are "datum", "event", "item", and "parent".
20422    #[serde(skip_serializing_if = "Option::is_none")]
20423    #[builder(default)]
20424    pub name: Option<String>,
20425    /// Determines the default event processing and data query for the selection. Vega-Lite
20426    /// currently supports two selection types:
20427    ///
20428    /// - `"point"` -- to select multiple discrete data values; the first value is selected on
20429    /// `click` and additional values toggled on shift-click.
20430    /// - `"interval"` -- to select a continuous range of data values on `drag`.
20431    #[serde(skip_serializing_if = "Option::is_none")]
20432    #[builder(default)]
20433    pub select: Option<ParamSelect>,
20434    /// Initialize the selection with a mapping between [projected channels or field
20435    /// names](https://vega.github.io/vega-lite/docs/selection.html#project) and initial values.
20436    ///
20437    /// __See also:__ [`init`](https://vega.github.io/vega-lite/docs/value.html) documentation.
20438    #[serde(skip_serializing_if = "Option::is_none")]
20439    #[builder(default)]
20440    pub value: Option<ParamValue>,
20441}
20442
20443/// When set, a selection is populated by input elements (also known as dynamic query
20444/// widgets) or by interacting with the corresponding legend. Direct manipulation interaction
20445/// is disabled by default; to re-enable it, set the selection's
20446/// [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties)
20447/// property.
20448///
20449/// Legend bindings are restricted to selections that only specify a single field or
20450/// encoding.
20451///
20452/// Query widget binding takes the form of Vega's [input element binding
20453/// definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between
20454/// projected field/encodings and binding definitions.
20455///
20456/// __See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.
20457#[derive(Debug, Clone, Serialize, Deserialize)]
20458#[serde(untagged)]
20459#[derive(From)]
20460pub enum ParamBind {
20461    Enum(LegendBinding),
20462    UnionMap(HashMap<String, PurpleStream>),
20463}
20464
20465#[derive(Debug, Clone, Serialize, Deserialize)]
20466#[serde(rename_all = "snake_case")]
20467pub enum LegendBinding {
20468    Legend,
20469    Scales,
20470}
20471
20472#[derive(Debug, Clone, Serialize, Deserialize)]
20473#[serde(untagged)]
20474#[derive(From)]
20475pub enum PurpleStream {
20476    AnythingArray(Vec<Option<serde_json::Value>>),
20477    Double(f64),
20478    PurpleBinding(PurpleBinding),
20479    String(String),
20480}
20481
20482/// Binds the parameter to an external input element such as a slider, selection list or
20483/// radio button group.
20484#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20485#[builder(setter(into, strip_option))]
20486pub struct PurpleBinding {
20487    /// If defined, delays event handling until the specified milliseconds have elapsed since the
20488    /// last event was fired.
20489    #[serde(skip_serializing_if = "Option::is_none")]
20490    #[builder(default)]
20491    pub debounce: Option<f64>,
20492    /// An optional CSS selector string indicating the parent element to which the input element
20493    /// should be added. By default, all input elements are added within the parent container of
20494    /// the Vega view.
20495    ///
20496    /// An input element that exposes a _value_ property and supports the
20497    /// [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) interface, or
20498    /// a CSS selector string to such an element. When the element updates and dispatches an
20499    /// event, the _value_ property will be used as the new, bound signal value. When the signal
20500    /// updates independent of the element, the _value_ property will be set to the signal value
20501    /// and a new event will be dispatched on the element.
20502    #[serde(skip_serializing_if = "Option::is_none")]
20503    #[builder(default)]
20504    pub element: Option<ElementUnion>,
20505    /// The type of input element to use. The valid values are `"checkbox"`, `"radio"`,
20506    /// `"range"`, `"select"`, and any other legal [HTML form input
20507    /// type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).
20508    #[serde(skip_serializing_if = "Option::is_none")]
20509    #[builder(default)]
20510    pub input: Option<String>,
20511    /// By default, the signal name is used to label input elements. This `name` property can be
20512    /// used instead to specify a custom label for the bound signal.
20513    #[serde(skip_serializing_if = "Option::is_none")]
20514    #[builder(default)]
20515    pub name: Option<String>,
20516    /// An array of label strings to represent the `options` values. If unspecified, the
20517    /// `options` value will be coerced to a string and used as the label.
20518    #[serde(skip_serializing_if = "Option::is_none")]
20519    #[builder(default)]
20520    pub labels: Option<Vec<String>>,
20521    /// An array of options to select from.
20522    #[serde(skip_serializing_if = "Option::is_none")]
20523    #[builder(default)]
20524    pub options: Option<Vec<Option<serde_json::Value>>>,
20525    /// Sets the maximum slider value. Defaults to the larger of the signal value and `100`.
20526    #[serde(skip_serializing_if = "Option::is_none")]
20527    #[builder(default)]
20528    pub max: Option<f64>,
20529    /// Sets the minimum slider value. Defaults to the smaller of the signal value and `0`.
20530    #[serde(skip_serializing_if = "Option::is_none")]
20531    #[builder(default)]
20532    pub min: Option<f64>,
20533    /// Sets the minimum slider increment. If undefined, the step size will be automatically
20534    /// determined based on the `min` and `max` values.
20535    #[serde(skip_serializing_if = "Option::is_none")]
20536    #[builder(default)]
20537    pub step: Option<f64>,
20538    /// A hint for form autofill. See the [HTML autocomplete
20539    /// attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for
20540    /// additional information.
20541    #[serde(skip_serializing_if = "Option::is_none")]
20542    #[builder(default)]
20543    pub autocomplete: Option<String>,
20544    /// Text that appears in the form control when it has no value set.
20545    #[serde(skip_serializing_if = "Option::is_none")]
20546    #[builder(default)]
20547    pub placeholder: Option<String>,
20548    /// The event (default `"input"`) to listen for to track changes on the external element.
20549    #[serde(skip_serializing_if = "Option::is_none")]
20550    #[builder(default)]
20551    pub event: Option<String>,
20552    #[serde(skip_serializing_if = "Option::is_none")]
20553    #[builder(default)]
20554    pub between: Option<Vec<Stream>>,
20555    #[serde(skip_serializing_if = "Option::is_none")]
20556    #[builder(default)]
20557    pub consume: Option<bool>,
20558    #[serde(skip_serializing_if = "Option::is_none")]
20559    #[builder(default)]
20560    pub filter: Option<LegendText>,
20561    #[serde(skip_serializing_if = "Option::is_none")]
20562    #[builder(default)]
20563    pub markname: Option<String>,
20564    #[serde(skip_serializing_if = "Option::is_none")]
20565    #[builder(default)]
20566    pub marktype: Option<MarkType>,
20567    #[serde(skip_serializing_if = "Option::is_none")]
20568    #[builder(default)]
20569    pub source: Option<Source>,
20570    #[serde(skip_serializing_if = "Option::is_none")]
20571    #[builder(default)]
20572    pub throttle: Option<f64>,
20573    #[serde(rename = "type")]
20574    #[serde(skip_serializing_if = "Option::is_none")]
20575    #[builder(default)]
20576    pub binding_type: Option<String>,
20577    #[serde(skip_serializing_if = "Option::is_none")]
20578    #[builder(default)]
20579    pub stream: Option<Stream>,
20580    #[serde(skip_serializing_if = "Option::is_none")]
20581    #[builder(default)]
20582    pub merge: Option<Vec<Stream>>,
20583}
20584
20585#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20586#[builder(setter(into, strip_option))]
20587pub struct Stream {
20588    #[serde(skip_serializing_if = "Option::is_none")]
20589    #[builder(default)]
20590    pub between: Option<Vec<Stream>>,
20591    #[serde(skip_serializing_if = "Option::is_none")]
20592    #[builder(default)]
20593    pub consume: Option<bool>,
20594    #[serde(skip_serializing_if = "Option::is_none")]
20595    #[builder(default)]
20596    pub debounce: Option<f64>,
20597    #[serde(skip_serializing_if = "Option::is_none")]
20598    #[builder(default)]
20599    pub filter: Option<LegendText>,
20600    #[serde(skip_serializing_if = "Option::is_none")]
20601    #[builder(default)]
20602    pub markname: Option<String>,
20603    #[serde(skip_serializing_if = "Option::is_none")]
20604    #[builder(default)]
20605    pub marktype: Option<MarkType>,
20606    #[serde(skip_serializing_if = "Option::is_none")]
20607    #[builder(default)]
20608    pub source: Option<Source>,
20609    #[serde(skip_serializing_if = "Option::is_none")]
20610    #[builder(default)]
20611    pub throttle: Option<f64>,
20612    #[serde(rename = "type")]
20613    #[serde(skip_serializing_if = "Option::is_none")]
20614    #[builder(default)]
20615    pub stream_type: Option<String>,
20616    #[serde(skip_serializing_if = "Option::is_none")]
20617    #[builder(default)]
20618    pub stream: Option<Box<Stream>>,
20619    #[serde(skip_serializing_if = "Option::is_none")]
20620    #[builder(default)]
20621    pub merge: Option<Vec<Stream>>,
20622}
20623
20624#[derive(Debug, Clone, Serialize, Deserialize)]
20625#[serde(rename_all = "snake_case")]
20626pub enum MarkType {
20627    Arc,
20628    Area,
20629    Group,
20630    Image,
20631    Line,
20632    Path,
20633    Rect,
20634    Rule,
20635    Shape,
20636    Symbol,
20637    Text,
20638    Trail,
20639}
20640
20641#[derive(Debug, Clone, Serialize, Deserialize)]
20642#[serde(rename_all = "snake_case")]
20643pub enum Source {
20644    Scope,
20645    View,
20646    Window,
20647}
20648
20649#[derive(Debug, Clone, Serialize, Deserialize)]
20650#[serde(untagged)]
20651#[derive(From)]
20652pub enum ElementUnion {
20653    ElementClass(ElementClass),
20654    String(String),
20655}
20656
20657#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20658#[builder(setter(into, strip_option))]
20659pub struct ElementClass {}
20660
20661/// Determines the default event processing and data query for the selection. Vega-Lite
20662/// currently supports two selection types:
20663///
20664/// - `"point"` -- to select multiple discrete data values; the first value is selected on
20665/// `click` and additional values toggled on shift-click.
20666/// - `"interval"` -- to select a continuous range of data values on `drag`.
20667#[derive(Debug, Clone, Serialize, Deserialize)]
20668#[serde(untagged)]
20669#[derive(From)]
20670pub enum ParamSelect {
20671    Enum(SelectionType),
20672    SelectionConfig(SelectionConfig),
20673}
20674
20675#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20676#[builder(setter(into, strip_option))]
20677pub struct SelectionConfig {
20678    /// Clears the selection, emptying it of all values. This property can be a [Event
20679    /// Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.
20680    ///
20681    /// __Default value:__ `dblclick`.
20682    ///
20683    /// __See also:__ [`clear` examples
20684    /// ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation.
20685    #[serde(skip_serializing_if = "Option::is_none")]
20686    #[builder(default)]
20687    pub clear: Option<ClearUnion>,
20688    /// An array of encoding channels. The corresponding data field values must match for a data
20689    /// tuple to fall within the selection.
20690    ///
20691    /// __See also:__ The [projection with `encodings` and `fields`
20692    /// section](https://vega.github.io/vega-lite/docs/selection.html#project) in the
20693    /// documentation.
20694    #[serde(skip_serializing_if = "Option::is_none")]
20695    #[builder(default)]
20696    pub encodings: Option<Vec<SingleDefUnitChannel>>,
20697    /// An array of field names whose values must match for a data tuple to fall within the
20698    /// selection.
20699    ///
20700    /// __See also:__ The [projection with `encodings` and `fields`
20701    /// section](https://vega.github.io/vega-lite/docs/selection.html#project) in the
20702    /// documentation.
20703    #[serde(skip_serializing_if = "Option::is_none")]
20704    #[builder(default)]
20705    pub fields: Option<Vec<String>>,
20706    /// When true, an invisible voronoi diagram is computed to accelerate discrete selection. The
20707    /// data value _nearest_ the mouse cursor is added to the selection.
20708    ///
20709    /// __Default value:__ `false`, which means that data values must be interacted with directly
20710    /// (e.g., clicked on) to be added to the selection.
20711    ///
20712    /// __See also:__ [`nearest`
20713    /// examples](https://vega.github.io/vega-lite/docs/selection.html#nearest) documentation.
20714    #[serde(skip_serializing_if = "Option::is_none")]
20715    #[builder(default)]
20716    pub nearest: Option<bool>,
20717    /// A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or
20718    /// selector) that triggers the selection. For interval selections, the event stream must
20719    /// specify a [start and
20720    /// end](https://vega.github.io/vega/docs/event-streams/#between-filters).
20721    ///
20722    /// __See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in
20723    /// the documentation.
20724    #[serde(skip_serializing_if = "Option::is_none")]
20725    #[builder(default)]
20726    pub on: Option<OnUnion>,
20727    /// With layered and multi-view displays, a strategy that determines how selections' data
20728    /// queries are resolved when applied in a filter transform, conditional encoding rule, or
20729    /// scale domain.
20730    ///
20731    /// One of:
20732    /// - `"global"` -- only one brush exists for the entire SPLOM. When the user begins to drag,
20733    /// any previous brushes are cleared, and a new one is constructed.
20734    /// - `"union"` -- each cell contains its own brush, and points are highlighted if they lie
20735    /// within _any_ of these individual brushes.
20736    /// - `"intersect"` -- each cell contains its own brush, and points are highlighted only if
20737    /// they fall within _all_ of these individual brushes.
20738    ///
20739    /// __Default value:__ `global`.
20740    ///
20741    /// __See also:__ [`resolve`
20742    /// examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the
20743    /// documentation.
20744    #[serde(skip_serializing_if = "Option::is_none")]
20745    #[builder(default)]
20746    pub resolve: Option<SelectionResolution>,
20747    /// Controls whether data values should be toggled (inserted or removed from a point
20748    /// selection) or only ever inserted into point selections.
20749    ///
20750    /// One of:
20751    /// - `true` -- the default behavior, which corresponds to `"event.shiftKey"`.  As a result,
20752    /// data values are toggled when the user interacts with the shift-key pressed.
20753    /// - `false` -- disables toggling behaviour; the selection will only ever contain a single
20754    /// data value corresponding to the most recent interaction.
20755    /// - A [Vega expression](https://vega.github.io/vega/docs/expressions/) which is
20756    /// re-evaluated as the user interacts. If the expression evaluates to `true`, the data value
20757    /// is toggled into or out of the point selection. If the expression evaluates to `false`,
20758    /// the point selection is first cleared, and the data value is then inserted. For example,
20759    /// setting the value to the Vega expression `"true"` will toggle data values without the
20760    /// user pressing the shift-key.
20761    ///
20762    /// __Default value:__ `true`
20763    ///
20764    /// __See also:__ [`toggle`
20765    /// examples](https://vega.github.io/vega-lite/docs/selection.html#toggle) in the
20766    /// documentation.
20767    #[serde(skip_serializing_if = "Option::is_none")]
20768    #[builder(default)]
20769    pub toggle: Option<Toggle>,
20770    /// Determines the default event processing and data query for the selection. Vega-Lite
20771    /// currently supports two selection types:
20772    ///
20773    /// - `"point"` -- to select multiple discrete data values; the first value is selected on
20774    /// `click` and additional values toggled on shift-click.
20775    /// - `"interval"` -- to select a continuous range of data values on `drag`.
20776    #[serde(rename = "type")]
20777    #[serde(skip_serializing_if = "Option::is_none")]
20778    #[builder(default)]
20779    pub selection_config_type: Option<SelectionType>,
20780    /// An interval selection also adds a rectangle mark to depict the extents of the interval.
20781    /// The `mark` property can be used to customize the appearance of the mark.
20782    ///
20783    /// __See also:__ [`mark`
20784    /// examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation.
20785    #[serde(skip_serializing_if = "Option::is_none")]
20786    #[builder(default)]
20787    pub mark: Option<BrushConfig>,
20788    /// When truthy, allows a user to interactively move an interval selection back-and-forth.
20789    /// Can be `true`, `false` (to disable panning), or a [Vega event stream
20790    /// definition](https://vega.github.io/vega/docs/event-streams/) which must include a start
20791    /// and end event to trigger continuous panning. Discrete panning (e.g., pressing the
20792    /// left/right arrow keys) will be supported in future versions.
20793    ///
20794    /// __Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] >
20795    /// window:pointermove!`. This default allows users to clicks and drags within an interval
20796    /// selection to reposition it.
20797    ///
20798    /// __See also:__ [`translate`
20799    /// examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the
20800    /// documentation.
20801    #[serde(skip_serializing_if = "Option::is_none")]
20802    #[builder(default)]
20803    pub translate: Option<Toggle>,
20804    /// When truthy, allows a user to interactively resize an interval selection. Can be `true`,
20805    /// `false` (to disable zooming), or a [Vega event stream
20806    /// definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel`
20807    /// events are supported, but custom event streams can still be used to specify filters,
20808    /// debouncing, and throttling. Future versions will expand the set of events that can
20809    /// trigger this transformation.
20810    ///
20811    /// __Default value:__ `true`, which corresponds to `wheel!`. This default allows users to
20812    /// use the mouse wheel to resize an interval selection.
20813    ///
20814    /// __See also:__ [`zoom`
20815    /// examples](https://vega.github.io/vega-lite/docs/selection.html#zoom) in the documentation.
20816    #[serde(skip_serializing_if = "Option::is_none")]
20817    #[builder(default)]
20818    pub zoom: Option<Toggle>,
20819}
20820
20821#[derive(Debug, Clone, Serialize, Deserialize)]
20822#[serde(untagged)]
20823#[derive(From)]
20824pub enum ClearUnion {
20825    Bool(bool),
20826    ClearDerivedStream(ClearDerivedStream),
20827    String(String),
20828}
20829
20830#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20831#[builder(setter(into, strip_option))]
20832pub struct ClearDerivedStream {
20833    #[serde(skip_serializing_if = "Option::is_none")]
20834    #[builder(default)]
20835    pub between: Option<Vec<Stream>>,
20836    #[serde(skip_serializing_if = "Option::is_none")]
20837    #[builder(default)]
20838    pub consume: Option<bool>,
20839    #[serde(skip_serializing_if = "Option::is_none")]
20840    #[builder(default)]
20841    pub debounce: Option<f64>,
20842    #[serde(skip_serializing_if = "Option::is_none")]
20843    #[builder(default)]
20844    pub filter: Option<LegendText>,
20845    #[serde(skip_serializing_if = "Option::is_none")]
20846    #[builder(default)]
20847    pub markname: Option<String>,
20848    #[serde(skip_serializing_if = "Option::is_none")]
20849    #[builder(default)]
20850    pub marktype: Option<MarkType>,
20851    #[serde(skip_serializing_if = "Option::is_none")]
20852    #[builder(default)]
20853    pub source: Option<Source>,
20854    #[serde(skip_serializing_if = "Option::is_none")]
20855    #[builder(default)]
20856    pub throttle: Option<f64>,
20857    #[serde(rename = "type")]
20858    #[serde(skip_serializing_if = "Option::is_none")]
20859    #[builder(default)]
20860    pub ed_stream_type: Option<String>,
20861    #[serde(skip_serializing_if = "Option::is_none")]
20862    #[builder(default)]
20863    pub stream: Option<Stream>,
20864    #[serde(skip_serializing_if = "Option::is_none")]
20865    #[builder(default)]
20866    pub merge: Option<Vec<Stream>>,
20867}
20868
20869/// An interval selection also adds a rectangle mark to depict the extents of the interval.
20870/// The `mark` property can be used to customize the appearance of the mark.
20871///
20872/// __See also:__ [`mark`
20873/// examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation.
20874#[derive(Debug, Clone, Serialize, Deserialize)]
20875#[serde(rename_all = "camelCase")]
20876#[derive(Default, Builder)]
20877#[builder(setter(into, strip_option))]
20878pub struct BrushConfig {
20879    /// The mouse cursor used over the interval mark. Any valid [CSS cursor
20880    /// type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
20881    #[serde(skip_serializing_if = "Option::is_none")]
20882    #[builder(default)]
20883    pub cursor: Option<Cursor>,
20884    /// The fill color of the interval mark.
20885    ///
20886    /// __Default value:__ `"#333333"`
20887    #[serde(skip_serializing_if = "Option::is_none")]
20888    #[builder(default)]
20889    pub fill: Option<String>,
20890    /// The fill opacity of the interval mark (a value between `0` and `1`).
20891    ///
20892    /// __Default value:__ `0.125`
20893    #[serde(skip_serializing_if = "Option::is_none")]
20894    #[builder(default)]
20895    pub fill_opacity: Option<f64>,
20896    /// The stroke color of the interval mark.
20897    ///
20898    /// __Default value:__ `"#ffffff"`
20899    #[serde(skip_serializing_if = "Option::is_none")]
20900    #[builder(default)]
20901    pub stroke: Option<String>,
20902    /// An array of alternating stroke and space lengths, for creating dashed or dotted lines.
20903    #[serde(skip_serializing_if = "Option::is_none")]
20904    #[builder(default)]
20905    pub stroke_dash: Option<Vec<f64>>,
20906    /// The offset (in pixels) with which to begin drawing the stroke dash array.
20907    #[serde(skip_serializing_if = "Option::is_none")]
20908    #[builder(default)]
20909    pub stroke_dash_offset: Option<f64>,
20910    /// The stroke opacity of the interval mark (a value between `0` and `1`).
20911    #[serde(skip_serializing_if = "Option::is_none")]
20912    #[builder(default)]
20913    pub stroke_opacity: Option<f64>,
20914    /// The stroke width of the interval mark.
20915    #[serde(skip_serializing_if = "Option::is_none")]
20916    #[builder(default)]
20917    pub stroke_width: Option<f64>,
20918}
20919
20920#[derive(Debug, Clone, Serialize, Deserialize)]
20921#[serde(untagged)]
20922#[derive(From)]
20923pub enum OnUnion {
20924    OnDerivedStream(OnDerivedStream),
20925    String(String),
20926}
20927
20928#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
20929#[builder(setter(into, strip_option))]
20930pub struct OnDerivedStream {
20931    #[serde(skip_serializing_if = "Option::is_none")]
20932    #[builder(default)]
20933    pub between: Option<Vec<Stream>>,
20934    #[serde(skip_serializing_if = "Option::is_none")]
20935    #[builder(default)]
20936    pub consume: Option<bool>,
20937    #[serde(skip_serializing_if = "Option::is_none")]
20938    #[builder(default)]
20939    pub debounce: Option<f64>,
20940    #[serde(skip_serializing_if = "Option::is_none")]
20941    #[builder(default)]
20942    pub filter: Option<LegendText>,
20943    #[serde(skip_serializing_if = "Option::is_none")]
20944    #[builder(default)]
20945    pub markname: Option<String>,
20946    #[serde(skip_serializing_if = "Option::is_none")]
20947    #[builder(default)]
20948    pub marktype: Option<MarkType>,
20949    #[serde(skip_serializing_if = "Option::is_none")]
20950    #[builder(default)]
20951    pub source: Option<Source>,
20952    #[serde(skip_serializing_if = "Option::is_none")]
20953    #[builder(default)]
20954    pub throttle: Option<f64>,
20955    #[serde(rename = "type")]
20956    #[serde(skip_serializing_if = "Option::is_none")]
20957    #[builder(default)]
20958    pub ed_stream_type: Option<String>,
20959    #[serde(skip_serializing_if = "Option::is_none")]
20960    #[builder(default)]
20961    pub stream: Option<Stream>,
20962    #[serde(skip_serializing_if = "Option::is_none")]
20963    #[builder(default)]
20964    pub merge: Option<Vec<Stream>>,
20965}
20966
20967/// With layered and multi-view displays, a strategy that determines how selections' data
20968/// queries are resolved when applied in a filter transform, conditional encoding rule, or
20969/// scale domain.
20970///
20971/// One of:
20972/// - `"global"` -- only one brush exists for the entire SPLOM. When the user begins to drag,
20973/// any previous brushes are cleared, and a new one is constructed.
20974/// - `"union"` -- each cell contains its own brush, and points are highlighted if they lie
20975/// within _any_ of these individual brushes.
20976/// - `"intersect"` -- each cell contains its own brush, and points are highlighted only if
20977/// they fall within _all_ of these individual brushes.
20978///
20979/// __Default value:__ `global`.
20980///
20981/// __See also:__ [`resolve`
20982/// examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the
20983/// documentation.
20984#[derive(Debug, Clone, Serialize, Deserialize)]
20985#[serde(rename_all = "snake_case")]
20986pub enum SelectionResolution {
20987    Global,
20988    Intersect,
20989    Union,
20990}
20991
20992/// Determines the default event processing and data query for the selection. Vega-Lite
20993/// currently supports two selection types:
20994///
20995/// - `"point"` -- to select multiple discrete data values; the first value is selected on
20996/// `click` and additional values toggled on shift-click.
20997/// - `"interval"` -- to select a continuous range of data values on `drag`.
20998#[derive(Debug, Clone, Serialize, Deserialize)]
20999#[serde(rename_all = "snake_case")]
21000pub enum SelectionType {
21001    Interval,
21002    Point,
21003}
21004
21005/// Controls whether data values should be toggled (inserted or removed from a point
21006/// selection) or only ever inserted into point selections.
21007///
21008/// One of:
21009/// - `true` -- the default behavior, which corresponds to `"event.shiftKey"`.  As a result,
21010/// data values are toggled when the user interacts with the shift-key pressed.
21011/// - `false` -- disables toggling behaviour; the selection will only ever contain a single
21012/// data value corresponding to the most recent interaction.
21013/// - A [Vega expression](https://vega.github.io/vega/docs/expressions/) which is
21014/// re-evaluated as the user interacts. If the expression evaluates to `true`, the data value
21015/// is toggled into or out of the point selection. If the expression evaluates to `false`,
21016/// the point selection is first cleared, and the data value is then inserted. For example,
21017/// setting the value to the Vega expression `"true"` will toggle data values without the
21018/// user pressing the shift-key.
21019///
21020/// __Default value:__ `true`
21021///
21022/// __See also:__ [`toggle`
21023/// examples](https://vega.github.io/vega-lite/docs/selection.html#toggle) in the
21024/// documentation.
21025///
21026/// When truthy, allows a user to interactively move an interval selection back-and-forth.
21027/// Can be `true`, `false` (to disable panning), or a [Vega event stream
21028/// definition](https://vega.github.io/vega/docs/event-streams/) which must include a start
21029/// and end event to trigger continuous panning. Discrete panning (e.g., pressing the
21030/// left/right arrow keys) will be supported in future versions.
21031///
21032/// __Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] >
21033/// window:pointermove!`. This default allows users to clicks and drags within an interval
21034/// selection to reposition it.
21035///
21036/// __See also:__ [`translate`
21037/// examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the
21038/// documentation.
21039///
21040/// When truthy, allows a user to interactively resize an interval selection. Can be `true`,
21041/// `false` (to disable zooming), or a [Vega event stream
21042/// definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel`
21043/// events are supported, but custom event streams can still be used to specify filters,
21044/// debouncing, and throttling. Future versions will expand the set of events that can
21045/// trigger this transformation.
21046///
21047/// __Default value:__ `true`, which corresponds to `wheel!`. This default allows users to
21048/// use the mouse wheel to resize an interval selection.
21049///
21050/// __See also:__ [`zoom`
21051/// examples](https://vega.github.io/vega-lite/docs/selection.html#zoom) in the documentation.
21052#[derive(Debug, Clone, Serialize, Deserialize)]
21053#[serde(untagged)]
21054#[derive(From)]
21055pub enum Toggle {
21056    Bool(bool),
21057    String(String),
21058}
21059
21060#[derive(Debug, Clone, Serialize, Deserialize)]
21061#[serde(untagged)]
21062#[derive(From)]
21063pub enum ParamValue {
21064    Bool(bool),
21065    Double(f64),
21066    String(String),
21067    UnionMap(HashMap<String, DateTimeValue>),
21068    UnionMapArray(Vec<HashMap<String, Option<SelectionInit>>>),
21069}
21070
21071#[derive(Debug, Clone, Serialize, Deserialize)]
21072#[serde(untagged)]
21073#[derive(From)]
21074pub enum SelectionInit {
21075    Bool(bool),
21076    DateTime(DateTime),
21077    Double(f64),
21078    String(String),
21079}
21080
21081#[derive(Debug, Clone, Serialize, Deserialize)]
21082#[serde(untagged)]
21083#[derive(From)]
21084pub enum DateTimeValue {
21085    Bool(bool),
21086    Double(f64),
21087    String(String),
21088    UnionArray(Vec<UnionWith>),
21089}
21090
21091/// Projection configuration, which determines default properties for all
21092/// [projections](https://vega.github.io/vega-lite/docs/projection.html). For a full list of
21093/// projection configuration options, please see the [corresponding section of the projection
21094/// documentation](https://vega.github.io/vega-lite/docs/projection.html#config).
21095///
21096/// Any property of Projection can be in config
21097///
21098/// An object defining properties of geographic projection, which will be applied to `shape`
21099/// path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other
21100/// marks.
21101///
21102/// An object defining properties of the geographic projection shared by underlying layers.
21103#[derive(Debug, Clone, Serialize, Deserialize)]
21104#[serde(rename_all = "camelCase")]
21105#[derive(Default, Builder)]
21106#[builder(setter(into, strip_option))]
21107pub struct Projection {
21108    #[serde(skip_serializing_if = "Option::is_none")]
21109    #[builder(default)]
21110    pub center: Option<StrokeDashUnion>,
21111    #[serde(skip_serializing_if = "Option::is_none")]
21112    #[builder(default)]
21113    pub clip_angle: Option<CornerRadiusUnion>,
21114    #[serde(skip_serializing_if = "Option::is_none")]
21115    #[builder(default)]
21116    pub clip_extent: Option<ClipExtentUnion>,
21117    #[serde(skip_serializing_if = "Option::is_none")]
21118    #[builder(default)]
21119    pub coefficient: Option<CornerRadiusUnion>,
21120    #[serde(skip_serializing_if = "Option::is_none")]
21121    #[builder(default)]
21122    pub distance: Option<CornerRadiusUnion>,
21123    #[serde(skip_serializing_if = "Option::is_none")]
21124    #[builder(default)]
21125    pub extent: Option<ClipExtentUnion>,
21126    #[serde(skip_serializing_if = "Option::is_none")]
21127    #[builder(default)]
21128    pub fit: Option<ProjectionFit>,
21129    #[serde(skip_serializing_if = "Option::is_none")]
21130    #[builder(default)]
21131    pub fraction: Option<CornerRadiusUnion>,
21132    #[serde(skip_serializing_if = "Option::is_none")]
21133    #[builder(default)]
21134    pub lobes: Option<CornerRadiusUnion>,
21135    #[serde(skip_serializing_if = "Option::is_none")]
21136    #[builder(default)]
21137    pub parallel: Option<CornerRadiusUnion>,
21138    #[serde(skip_serializing_if = "Option::is_none")]
21139    #[builder(default)]
21140    pub parallels: Option<StrokeDashUnion>,
21141    #[serde(skip_serializing_if = "Option::is_none")]
21142    #[builder(default)]
21143    pub point_radius: Option<CornerRadiusUnion>,
21144    #[serde(skip_serializing_if = "Option::is_none")]
21145    #[builder(default)]
21146    pub precision: Option<CornerRadiusUnion>,
21147    #[serde(skip_serializing_if = "Option::is_none")]
21148    #[builder(default)]
21149    pub radius: Option<CornerRadiusUnion>,
21150    #[serde(skip_serializing_if = "Option::is_none")]
21151    #[builder(default)]
21152    pub ratio: Option<CornerRadiusUnion>,
21153    #[serde(skip_serializing_if = "Option::is_none")]
21154    #[builder(default)]
21155    pub reflect_x: Option<Aria>,
21156    #[serde(skip_serializing_if = "Option::is_none")]
21157    #[builder(default)]
21158    pub reflect_y: Option<Aria>,
21159    #[serde(skip_serializing_if = "Option::is_none")]
21160    #[builder(default)]
21161    pub rotate: Option<StrokeDashUnion>,
21162    /// The projection’s scale (zoom) factor, overriding automatic fitting. The default scale is
21163    /// projection-specific. The scale factor corresponds linearly to the distance between
21164    /// projected points; however, scale factor values are not equivalent across projections.
21165    #[serde(skip_serializing_if = "Option::is_none")]
21166    #[builder(default)]
21167    pub scale: Option<CornerRadiusUnion>,
21168    #[serde(skip_serializing_if = "Option::is_none")]
21169    #[builder(default)]
21170    pub size: Option<StrokeDashUnion>,
21171    #[serde(skip_serializing_if = "Option::is_none")]
21172    #[builder(default)]
21173    pub spacing: Option<CornerRadiusUnion>,
21174    #[serde(skip_serializing_if = "Option::is_none")]
21175    #[builder(default)]
21176    pub tilt: Option<CornerRadiusUnion>,
21177    /// The projection’s translation offset as a two-element array `[tx, ty]`.
21178    #[serde(skip_serializing_if = "Option::is_none")]
21179    #[builder(default)]
21180    pub translate: Option<StrokeDashUnion>,
21181    /// The cartographic projection to use. This value is case-insensitive, for example
21182    /// `"albers"` and `"Albers"` indicate the same projection type. You can find all valid
21183    /// projection types [in the
21184    /// documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).
21185    ///
21186    /// __Default value:__ `equalEarth`
21187    #[serde(rename = "type")]
21188    #[serde(skip_serializing_if = "Option::is_none")]
21189    #[builder(default)]
21190    pub projection_type: Option<TypeUnion>,
21191}
21192
21193#[derive(Debug, Clone, Serialize, Deserialize)]
21194#[serde(untagged)]
21195#[derive(From)]
21196pub enum ClipExtentUnion {
21197    BackgroundExprRef(BackgroundExprRef),
21198    DoubleArrayArray(Vec<Vec<f64>>),
21199}
21200
21201#[derive(Debug, Clone, Serialize, Deserialize)]
21202#[serde(untagged)]
21203#[derive(From)]
21204pub enum ProjectionFit {
21205    ExprRefClass(ExprRefClass),
21206    UnionArray(Vec<FitElement>),
21207}
21208
21209#[derive(Debug, Clone, Serialize, Deserialize)]
21210#[serde(untagged)]
21211#[derive(From)]
21212pub enum FitElement {
21213    FeatureArray(Vec<Feature>),
21214    PurpleFeature(PurpleFeature),
21215}
21216
21217/// A feature object which contains a geometry and associated properties.
21218/// https://tools.ietf.org/html/rfc7946#section-3.2
21219#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
21220#[builder(setter(into, strip_option))]
21221pub struct Feature {
21222    /// Bounding box of the coordinate range of the object's Geometries, Features, or Feature
21223    /// Collections. https://tools.ietf.org/html/rfc7946#section-5
21224    #[serde(skip_serializing_if = "Option::is_none")]
21225    #[builder(default)]
21226    pub bbox: Option<Vec<f64>>,
21227    /// The feature's geometry
21228    #[serde(skip_serializing_if = "Option::is_none")]
21229    #[builder(default)]
21230    pub geometry: Option<Geometry>,
21231    /// A value that uniquely identifies this feature in a
21232    /// https://tools.ietf.org/html/rfc7946#section-3.2.
21233    #[serde(skip_serializing_if = "Option::is_none")]
21234    #[builder(default)]
21235    pub id: Option<Id>,
21236    /// Properties associated with this feature.
21237    #[serde(skip_serializing_if = "Option::is_none")]
21238    #[builder(default)]
21239    pub properties: Option<HashMap<String, Option<serde_json::Value>>>,
21240    /// Specifies the type of GeoJSON object.
21241    #[serde(rename = "type")]
21242    #[serde(skip_serializing_if = "Option::is_none")]
21243    #[builder(default)]
21244    pub feature_type: Option<FitType>,
21245}
21246
21247/// Specifies the type of GeoJSON object.
21248#[derive(Debug, Clone, Serialize, Deserialize)]
21249pub enum FitType {
21250    Feature,
21251}
21252
21253/// The feature's geometry
21254///
21255/// Union of geometry objects. https://tools.ietf.org/html/rfc7946#section-3
21256///
21257/// Point geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.2
21258///
21259/// MultiPoint geometry object.  https://tools.ietf.org/html/rfc7946#section-3.1.3
21260///
21261/// LineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.4
21262///
21263/// MultiLineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.5
21264///
21265/// Polygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.6
21266///
21267/// MultiPolygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.7
21268///
21269/// Geometry Collection https://tools.ietf.org/html/rfc7946#section-3.1.8
21270#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
21271#[builder(setter(into, strip_option))]
21272pub struct Geometry {
21273    /// Bounding box of the coordinate range of the object's Geometries, Features, or Feature
21274    /// Collections. https://tools.ietf.org/html/rfc7946#section-5
21275    #[serde(skip_serializing_if = "Option::is_none")]
21276    #[builder(default)]
21277    pub bbox: Option<Vec<f64>>,
21278    #[serde(skip_serializing_if = "Option::is_none")]
21279    #[builder(default)]
21280    pub coordinates: Option<Vec<Coordinate>>,
21281    /// Specifies the type of GeoJSON object.
21282    #[serde(rename = "type")]
21283    #[serde(skip_serializing_if = "Option::is_none")]
21284    #[builder(default)]
21285    pub geometry_type: Option<GeometryType>,
21286    #[serde(skip_serializing_if = "Option::is_none")]
21287    #[builder(default)]
21288    pub geometries: Option<Vec<Geometry>>,
21289}
21290
21291#[derive(Debug, Clone, Serialize, Deserialize)]
21292#[serde(untagged)]
21293#[derive(From)]
21294pub enum Coordinate {
21295    Double(f64),
21296    UnionArray(Vec<CoordinateVector2Number>),
21297}
21298
21299#[derive(Debug, Clone, Serialize, Deserialize)]
21300#[serde(untagged)]
21301#[derive(From)]
21302pub enum CoordinateVector2Number {
21303    Double(f64),
21304    UnionArray(Vec<Vector2NumberVector2Number>),
21305}
21306
21307#[derive(Debug, Clone, Serialize, Deserialize)]
21308#[serde(untagged)]
21309#[derive(From)]
21310pub enum Vector2NumberVector2Number {
21311    Double(f64),
21312    DoubleArray(Vec<f64>),
21313}
21314
21315/// Specifies the type of GeoJSON object.
21316#[derive(Debug, Clone, Serialize, Deserialize)]
21317pub enum GeometryType {
21318    #[serde(rename = "GeometryCollection")]
21319    GeometryCollection,
21320    #[serde(rename = "LineString")]
21321    LineString,
21322    #[serde(rename = "MultiLineString")]
21323    MultiLineString,
21324    #[serde(rename = "MultiPoint")]
21325    MultiPoint,
21326    #[serde(rename = "MultiPolygon")]
21327    MultiPolygon,
21328    Point,
21329    Polygon,
21330}
21331
21332/// A value that uniquely identifies this feature in a
21333/// https://tools.ietf.org/html/rfc7946#section-3.2.
21334#[derive(Debug, Clone, Serialize, Deserialize)]
21335#[serde(untagged)]
21336#[derive(From)]
21337pub enum Id {
21338    Double(f64),
21339    String(String),
21340}
21341
21342/// A feature object which contains a geometry and associated properties.
21343/// https://tools.ietf.org/html/rfc7946#section-3.2
21344///
21345/// A collection of feature objects.  https://tools.ietf.org/html/rfc7946#section-3.3
21346#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
21347#[builder(setter(into, strip_option))]
21348pub struct PurpleFeature {
21349    /// Bounding box of the coordinate range of the object's Geometries, Features, or Feature
21350    /// Collections. https://tools.ietf.org/html/rfc7946#section-5
21351    #[serde(skip_serializing_if = "Option::is_none")]
21352    #[builder(default)]
21353    pub bbox: Option<Vec<f64>>,
21354    /// The feature's geometry
21355    #[serde(skip_serializing_if = "Option::is_none")]
21356    #[builder(default)]
21357    pub geometry: Option<Geometry>,
21358    /// A value that uniquely identifies this feature in a
21359    /// https://tools.ietf.org/html/rfc7946#section-3.2.
21360    #[serde(skip_serializing_if = "Option::is_none")]
21361    #[builder(default)]
21362    pub id: Option<Id>,
21363    /// Properties associated with this feature.
21364    #[serde(skip_serializing_if = "Option::is_none")]
21365    #[builder(default)]
21366    pub properties: Option<HashMap<String, Option<serde_json::Value>>>,
21367    /// Specifies the type of GeoJSON object.
21368    #[serde(rename = "type")]
21369    #[serde(skip_serializing_if = "Option::is_none")]
21370    #[builder(default)]
21371    pub feature_type: Option<FeatureType>,
21372    #[serde(skip_serializing_if = "Option::is_none")]
21373    #[builder(default)]
21374    pub features: Option<Vec<FeatureGeometryGeoJsonProperties>>,
21375}
21376
21377/// Specifies the type of GeoJSON object.
21378#[derive(Debug, Clone, Serialize, Deserialize)]
21379pub enum FeatureType {
21380    Feature,
21381    #[serde(rename = "FeatureCollection")]
21382    FeatureCollection,
21383}
21384
21385/// A feature object which contains a geometry and associated properties.
21386/// https://tools.ietf.org/html/rfc7946#section-3.2
21387#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
21388#[builder(setter(into, strip_option))]
21389pub struct FeatureGeometryGeoJsonProperties {
21390    /// Bounding box of the coordinate range of the object's Geometries, Features, or Feature
21391    /// Collections. https://tools.ietf.org/html/rfc7946#section-5
21392    #[serde(skip_serializing_if = "Option::is_none")]
21393    #[builder(default)]
21394    pub bbox: Option<Vec<f64>>,
21395    /// The feature's geometry
21396    #[serde(skip_serializing_if = "Option::is_none")]
21397    #[builder(default)]
21398    pub geometry: Option<Geometry>,
21399    /// A value that uniquely identifies this feature in a
21400    /// https://tools.ietf.org/html/rfc7946#section-3.2.
21401    #[serde(skip_serializing_if = "Option::is_none")]
21402    #[builder(default)]
21403    pub id: Option<Id>,
21404    /// Properties associated with this feature.
21405    #[serde(skip_serializing_if = "Option::is_none")]
21406    #[builder(default)]
21407    pub properties: Option<HashMap<String, Option<serde_json::Value>>>,
21408    /// Specifies the type of GeoJSON object.
21409    #[serde(rename = "type")]
21410    #[serde(skip_serializing_if = "Option::is_none")]
21411    #[builder(default)]
21412    pub feature_geometry_geo_json_properties_type: Option<FitType>,
21413}
21414
21415/// A feature object which contains a geometry and associated properties.
21416/// https://tools.ietf.org/html/rfc7946#section-3.2
21417///
21418/// A collection of feature objects.  https://tools.ietf.org/html/rfc7946#section-3.3
21419///
21420/// An expression for an array of raw values that, if non-null, directly overrides the
21421/// _domain_ property. This is useful for supporting interactions such as panning or zooming
21422/// a scale. The scale may be initially determined using a data-driven domain, then modified
21423/// in response to user input by setting the rawDomain value.
21424#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
21425#[builder(setter(into, strip_option))]
21426pub struct ExprRefClass {
21427    /// Bounding box of the coordinate range of the object's Geometries, Features, or Feature
21428    /// Collections. https://tools.ietf.org/html/rfc7946#section-5
21429    #[serde(skip_serializing_if = "Option::is_none")]
21430    #[builder(default)]
21431    pub bbox: Option<Vec<f64>>,
21432    /// The feature's geometry
21433    #[serde(skip_serializing_if = "Option::is_none")]
21434    #[builder(default)]
21435    pub geometry: Option<Geometry>,
21436    /// A value that uniquely identifies this feature in a
21437    /// https://tools.ietf.org/html/rfc7946#section-3.2.
21438    #[serde(skip_serializing_if = "Option::is_none")]
21439    #[builder(default)]
21440    pub id: Option<Id>,
21441    /// Properties associated with this feature.
21442    #[serde(skip_serializing_if = "Option::is_none")]
21443    #[builder(default)]
21444    pub properties: Option<HashMap<String, Option<serde_json::Value>>>,
21445    /// Specifies the type of GeoJSON object.
21446    #[serde(rename = "type")]
21447    #[serde(skip_serializing_if = "Option::is_none")]
21448    #[builder(default)]
21449    pub feature_type: Option<FeatureType>,
21450    #[serde(skip_serializing_if = "Option::is_none")]
21451    #[builder(default)]
21452    pub features: Option<Vec<FeatureGeometryGeoJsonProperties>>,
21453    /// Vega expression (which can refer to Vega-Lite parameters).
21454    #[serde(skip_serializing_if = "Option::is_none")]
21455    #[builder(default)]
21456    pub expr: Option<String>,
21457}
21458
21459/// The cartographic projection to use. This value is case-insensitive, for example
21460/// `"albers"` and `"Albers"` indicate the same projection type. You can find all valid
21461/// projection types [in the
21462/// documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).
21463///
21464/// __Default value:__ `equalEarth`
21465#[derive(Debug, Clone, Serialize, Deserialize)]
21466#[serde(untagged)]
21467#[derive(From)]
21468pub enum TypeUnion {
21469    BackgroundExprRef(BackgroundExprRef),
21470    Enum(ProjectionType),
21471}
21472
21473#[derive(Debug, Clone, Serialize, Deserialize)]
21474#[serde(rename_all = "camelCase")]
21475pub enum ProjectionType {
21476    Albers,
21477    #[serde(rename = "albersUsa")]
21478    AlbersUsa,
21479    #[serde(rename = "azimuthalEqualArea")]
21480    AzimuthalEqualArea,
21481    #[serde(rename = "azimuthalEquidistant")]
21482    AzimuthalEquidistant,
21483    #[serde(rename = "conicConformal")]
21484    ConicConformal,
21485    #[serde(rename = "conicEqualArea")]
21486    ConicEqualArea,
21487    #[serde(rename = "conicEquidistant")]
21488    ConicEquidistant,
21489    #[serde(rename = "equalEarth")]
21490    EqualEarth,
21491    Equirectangular,
21492    Gnomonic,
21493    Identity,
21494    Mercator,
21495    #[serde(rename = "naturalEarth1")]
21496    NaturalEarth1,
21497    Orthographic,
21498    Stereographic,
21499    #[serde(rename = "transverseMercator")]
21500    TransverseMercator,
21501}
21502
21503/// Scale, axis, and legend resolutions for view composition specifications.
21504///
21505/// Defines how scales, axes, and legends from different specs should be combined. Resolve is
21506/// a mapping from `scale`, `axis`, and `legend` to a mapping from channels to resolutions.
21507/// Scales and guides can be resolved to be `"independent"` or `"shared"`.
21508#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
21509#[builder(setter(into, strip_option))]
21510pub struct Resolve {
21511    #[serde(skip_serializing_if = "Option::is_none")]
21512    #[builder(default)]
21513    pub axis: Option<AxisResolveMap>,
21514    #[serde(skip_serializing_if = "Option::is_none")]
21515    #[builder(default)]
21516    pub legend: Option<LegendResolveMap>,
21517    #[serde(skip_serializing_if = "Option::is_none")]
21518    #[builder(default)]
21519    pub scale: Option<ScaleResolveMap>,
21520}
21521
21522#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
21523#[builder(setter(into, strip_option))]
21524pub struct AxisResolveMap {
21525    #[serde(skip_serializing_if = "Option::is_none")]
21526    #[builder(default)]
21527    pub x: Option<ResolveMode>,
21528    #[serde(skip_serializing_if = "Option::is_none")]
21529    #[builder(default)]
21530    pub y: Option<ResolveMode>,
21531}
21532
21533/// Indicates how parameters for multiple densities should be resolved. If `"independent"`,
21534/// each density may have its own domain extent and dynamic number of curve sample steps. If
21535/// `"shared"`, the KDE transform will ensure that all densities are defined over a shared
21536/// domain and curve steps, enabling stacking.
21537///
21538/// __Default value:__ `"shared"`
21539#[derive(Debug, Clone, Serialize, Deserialize)]
21540#[serde(rename_all = "snake_case")]
21541pub enum ResolveMode {
21542    Independent,
21543    Shared,
21544}
21545
21546#[derive(Debug, Clone, Serialize, Deserialize)]
21547#[serde(rename_all = "camelCase")]
21548#[derive(Default, Builder)]
21549#[builder(setter(into, strip_option))]
21550pub struct LegendResolveMap {
21551    #[serde(skip_serializing_if = "Option::is_none")]
21552    #[builder(default)]
21553    pub angle: Option<ResolveMode>,
21554    #[serde(skip_serializing_if = "Option::is_none")]
21555    #[builder(default)]
21556    pub color: Option<ResolveMode>,
21557    #[serde(skip_serializing_if = "Option::is_none")]
21558    #[builder(default)]
21559    pub fill: Option<ResolveMode>,
21560    #[serde(skip_serializing_if = "Option::is_none")]
21561    #[builder(default)]
21562    pub fill_opacity: Option<ResolveMode>,
21563    #[serde(skip_serializing_if = "Option::is_none")]
21564    #[builder(default)]
21565    pub opacity: Option<ResolveMode>,
21566    #[serde(skip_serializing_if = "Option::is_none")]
21567    #[builder(default)]
21568    pub shape: Option<ResolveMode>,
21569    #[serde(skip_serializing_if = "Option::is_none")]
21570    #[builder(default)]
21571    pub size: Option<ResolveMode>,
21572    #[serde(skip_serializing_if = "Option::is_none")]
21573    #[builder(default)]
21574    pub stroke: Option<ResolveMode>,
21575    #[serde(skip_serializing_if = "Option::is_none")]
21576    #[builder(default)]
21577    pub stroke_dash: Option<ResolveMode>,
21578    #[serde(skip_serializing_if = "Option::is_none")]
21579    #[builder(default)]
21580    pub stroke_opacity: Option<ResolveMode>,
21581    #[serde(skip_serializing_if = "Option::is_none")]
21582    #[builder(default)]
21583    pub stroke_width: Option<ResolveMode>,
21584    #[serde(skip_serializing_if = "Option::is_none")]
21585    #[builder(default)]
21586    pub time: Option<ResolveMode>,
21587}
21588
21589#[derive(Debug, Clone, Serialize, Deserialize)]
21590#[serde(rename_all = "camelCase")]
21591#[derive(Default, Builder)]
21592#[builder(setter(into, strip_option))]
21593pub struct ScaleResolveMap {
21594    #[serde(skip_serializing_if = "Option::is_none")]
21595    #[builder(default)]
21596    pub angle: Option<ResolveMode>,
21597    #[serde(skip_serializing_if = "Option::is_none")]
21598    #[builder(default)]
21599    pub color: Option<ResolveMode>,
21600    #[serde(skip_serializing_if = "Option::is_none")]
21601    #[builder(default)]
21602    pub fill: Option<ResolveMode>,
21603    #[serde(skip_serializing_if = "Option::is_none")]
21604    #[builder(default)]
21605    pub fill_opacity: Option<ResolveMode>,
21606    #[serde(skip_serializing_if = "Option::is_none")]
21607    #[builder(default)]
21608    pub opacity: Option<ResolveMode>,
21609    #[serde(skip_serializing_if = "Option::is_none")]
21610    #[builder(default)]
21611    pub radius: Option<ResolveMode>,
21612    #[serde(skip_serializing_if = "Option::is_none")]
21613    #[builder(default)]
21614    pub shape: Option<ResolveMode>,
21615    #[serde(skip_serializing_if = "Option::is_none")]
21616    #[builder(default)]
21617    pub size: Option<ResolveMode>,
21618    #[serde(skip_serializing_if = "Option::is_none")]
21619    #[builder(default)]
21620    pub stroke: Option<ResolveMode>,
21621    #[serde(skip_serializing_if = "Option::is_none")]
21622    #[builder(default)]
21623    pub stroke_dash: Option<ResolveMode>,
21624    #[serde(skip_serializing_if = "Option::is_none")]
21625    #[builder(default)]
21626    pub stroke_opacity: Option<ResolveMode>,
21627    #[serde(skip_serializing_if = "Option::is_none")]
21628    #[builder(default)]
21629    pub stroke_width: Option<ResolveMode>,
21630    #[serde(skip_serializing_if = "Option::is_none")]
21631    #[builder(default)]
21632    pub theta: Option<ResolveMode>,
21633    #[serde(skip_serializing_if = "Option::is_none")]
21634    #[builder(default)]
21635    pub time: Option<ResolveMode>,
21636    #[serde(skip_serializing_if = "Option::is_none")]
21637    #[builder(default)]
21638    pub x: Option<ResolveMode>,
21639    #[serde(skip_serializing_if = "Option::is_none")]
21640    #[builder(default)]
21641    pub x_offset: Option<ResolveMode>,
21642    #[serde(skip_serializing_if = "Option::is_none")]
21643    #[builder(default)]
21644    pub y: Option<ResolveMode>,
21645    #[serde(skip_serializing_if = "Option::is_none")]
21646    #[builder(default)]
21647    pub y_offset: Option<ResolveMode>,
21648}
21649
21650/// Title for the plot.
21651#[derive(Debug, Clone, Serialize, Deserialize)]
21652#[serde(untagged)]
21653#[derive(From)]
21654pub enum TitleUnion {
21655    String(String),
21656    StringArray(Vec<String>),
21657    TitleParams(Box<TitleParams>),
21658}
21659
21660#[derive(Debug, Clone, Serialize, Deserialize)]
21661#[serde(rename_all = "camelCase")]
21662#[derive(Default, Builder)]
21663#[builder(setter(into, strip_option))]
21664pub struct TitleParams {
21665    /// Horizontal text alignment for title text. One of `"left"`, `"center"`, or `"right"`.
21666    #[serde(skip_serializing_if = "Option::is_none")]
21667    #[builder(default)]
21668    pub align: Option<Align>,
21669    /// The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For
21670    /// example, with an orientation of top these anchor positions map to a left-, center-, or
21671    /// right-aligned title.
21672    ///
21673    /// __Default value:__ `"middle"` for
21674    /// [single](https://vega.github.io/vega-lite/docs/spec.html) and
21675    /// [layered](https://vega.github.io/vega-lite/docs/layer.html) views. `"start"` for other
21676    /// composite views.
21677    ///
21678    /// __Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only
21679    /// customizable only for [single](https://vega.github.io/vega-lite/docs/spec.html) and
21680    /// [layered](https://vega.github.io/vega-lite/docs/layer.html) views. For other composite
21681    /// views, `anchor` is always `"start"`.
21682    #[serde(skip_serializing_if = "Option::is_none")]
21683    #[builder(default)]
21684    pub anchor: Option<TitleAnchorEnum>,
21685    #[serde(skip_serializing_if = "Option::is_none")]
21686    #[builder(default)]
21687    pub angle: Option<CornerRadiusUnion>,
21688    #[serde(skip_serializing_if = "Option::is_none")]
21689    #[builder(default)]
21690    pub aria: Option<Aria>,
21691    /// Vertical text baseline for title and subtitle text. One of `"alphabetic"` (default),
21692    /// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
21693    /// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
21694    /// relative to the *lineHeight* rather than *fontSize* alone.
21695    #[serde(skip_serializing_if = "Option::is_none")]
21696    #[builder(default)]
21697    pub baseline: Option<Baseline>,
21698    #[serde(skip_serializing_if = "Option::is_none")]
21699    #[builder(default)]
21700    pub color: Option<Box<Color>>,
21701    #[serde(skip_serializing_if = "Option::is_none")]
21702    #[builder(default)]
21703    pub dx: Option<CornerRadiusUnion>,
21704    #[serde(skip_serializing_if = "Option::is_none")]
21705    #[builder(default)]
21706    pub dy: Option<CornerRadiusUnion>,
21707    #[serde(skip_serializing_if = "Option::is_none")]
21708    #[builder(default)]
21709    pub font: Option<Box<Color>>,
21710    #[serde(skip_serializing_if = "Option::is_none")]
21711    #[builder(default)]
21712    pub font_size: Option<FontSize>,
21713    #[serde(skip_serializing_if = "Option::is_none")]
21714    #[builder(default)]
21715    pub font_style: Option<Box<Color>>,
21716    #[serde(skip_serializing_if = "Option::is_none")]
21717    #[builder(default)]
21718    pub font_weight: Option<FontWeightUnion>,
21719    #[serde(skip_serializing_if = "Option::is_none")]
21720    #[builder(default)]
21721    pub frame: Option<Box<Color>>,
21722    #[serde(skip_serializing_if = "Option::is_none")]
21723    #[builder(default)]
21724    pub limit: Option<FontSize>,
21725    #[serde(skip_serializing_if = "Option::is_none")]
21726    #[builder(default)]
21727    pub line_height: Option<CornerRadiusUnion>,
21728    #[serde(skip_serializing_if = "Option::is_none")]
21729    #[builder(default)]
21730    pub offset: Option<CornerRadiusUnion>,
21731    #[serde(skip_serializing_if = "Option::is_none")]
21732    #[builder(default)]
21733    pub orient: Option<TitleParamsOrient>,
21734    /// A [mark style property](https://vega.github.io/vega-lite/docs/config.html#style) to apply
21735    /// to the title text mark.
21736    ///
21737    /// __Default value:__ `"group-title"`.
21738    #[serde(skip_serializing_if = "Option::is_none")]
21739    #[builder(default)]
21740    pub style: Option<LegendText>,
21741    /// The subtitle Text.
21742    #[serde(skip_serializing_if = "Option::is_none")]
21743    #[builder(default)]
21744    pub subtitle: Option<LegendText>,
21745    #[serde(skip_serializing_if = "Option::is_none")]
21746    #[builder(default)]
21747    pub subtitle_color: Option<Box<Color>>,
21748    #[serde(skip_serializing_if = "Option::is_none")]
21749    #[builder(default)]
21750    pub subtitle_font: Option<Box<Color>>,
21751    #[serde(skip_serializing_if = "Option::is_none")]
21752    #[builder(default)]
21753    pub subtitle_font_size: Option<FontSize>,
21754    #[serde(skip_serializing_if = "Option::is_none")]
21755    #[builder(default)]
21756    pub subtitle_font_style: Option<Box<Color>>,
21757    #[serde(skip_serializing_if = "Option::is_none")]
21758    #[builder(default)]
21759    pub subtitle_font_weight: Option<FontWeightUnion>,
21760    #[serde(skip_serializing_if = "Option::is_none")]
21761    #[builder(default)]
21762    pub subtitle_line_height: Option<CornerRadiusUnion>,
21763    #[serde(skip_serializing_if = "Option::is_none")]
21764    #[builder(default)]
21765    pub subtitle_padding: Option<CornerRadiusUnion>,
21766    /// The title text.
21767    #[serde(skip_serializing_if = "Option::is_none")]
21768    #[builder(default)]
21769    pub text: Option<ConditionalValueDefTextExprRefText>,
21770    /// The integer z-index indicating the layering of the title group relative to other axis,
21771    /// mark and legend groups.
21772    ///
21773    /// __Default value:__ `0`.
21774    #[serde(skip_serializing_if = "Option::is_none")]
21775    #[builder(default)]
21776    pub zindex: Option<f64>,
21777}
21778
21779#[derive(Debug, Clone, Serialize, Deserialize)]
21780#[serde(untagged)]
21781#[derive(From)]
21782pub enum TitleParamsOrient {
21783    BackgroundExprRef(BackgroundExprRef),
21784    Enum(TitleOrient),
21785}
21786
21787/// Default title orientation (`"top"`, `"bottom"`, `"left"`, or `"right"`)
21788#[derive(Debug, Clone, Serialize, Deserialize)]
21789#[serde(rename_all = "snake_case")]
21790pub enum TitleOrient {
21791    Bottom,
21792    Left,
21793    None,
21794    Right,
21795    Top,
21796}
21797
21798#[derive(Debug, Clone, Serialize, Deserialize)]
21799#[serde(rename_all = "camelCase")]
21800#[derive(Default, Builder)]
21801#[builder(setter(into, strip_option))]
21802pub struct Transform {
21803    /// Array of objects that define fields to aggregate.
21804    #[serde(skip_serializing_if = "Option::is_none")]
21805    #[builder(default)]
21806    pub aggregate: Option<Vec<AggregatedFieldDef>>,
21807    /// The data fields to group by. If not specified, a single group containing all data objects
21808    /// will be used.
21809    ///
21810    /// An optional array of fields by which to group the values. Imputation will then be
21811    /// performed on a per-group basis.
21812    ///
21813    /// The data fields for partitioning the data objects into separate groups. If unspecified,
21814    /// all data points will be in a single group.
21815    ///
21816    /// The data fields to group by.
21817    ///
21818    /// The data fields for partitioning the data objects into separate windows. If unspecified,
21819    /// all data points will be in a single window.
21820    ///
21821    /// The optional data fields to group by. If not specified, a single group containing all
21822    /// data objects will be used.
21823    #[serde(skip_serializing_if = "Option::is_none")]
21824    #[builder(default)]
21825    pub groupby: Option<Vec<String>>,
21826    /// The output fields at which to write the start and end bin values. This can be either a
21827    /// string or an array of strings with two elements denoting the name for the fields for bin
21828    /// start and bin end respectively. If a single string (e.g., `"val"`) is provided, the end
21829    /// field will be `"val_end"`.
21830    ///
21831    /// The field for storing the computed formula value.
21832    ///
21833    /// The output fields for the sample value and corresponding density estimate.
21834    ///
21835    /// __Default value:__ `["value", "density"]`
21836    ///
21837    /// The output field names for extracted array values.
21838    ///
21839    /// __Default value:__ The field name of the corresponding array field
21840    ///
21841    /// The output field names for the key and value properties produced by the fold transform.
21842    /// __Default value:__ `["key", "value"]`
21843    ///
21844    /// The output field names for the smoothed points generated by the loess transform.
21845    ///
21846    /// __Default value:__ The field names of the input x and y values.
21847    ///
21848    /// The output fields on which to store the looked up data values.
21849    ///
21850    /// For data lookups, this property may be left blank if `from.fields` has been specified
21851    /// (those field names will be used); if `from.fields` has not been specified, `as` must be a
21852    /// string.
21853    ///
21854    /// For selection lookups, this property is optional: if unspecified, looked up values will
21855    /// be stored under a property named for the selection; and if specified, it must correspond
21856    /// to `from.fields`.
21857    ///
21858    /// The output field names for the probability and quantile values.
21859    ///
21860    /// __Default value:__ `["prob", "value"]`
21861    ///
21862    /// The output field names for the smoothed points generated by the regression transform.
21863    ///
21864    /// __Default value:__ The field names of the input x and y values.
21865    ///
21866    /// The output field to write the timeUnit value.
21867    ///
21868    /// Output field names. This can be either a string or an array of strings with two elements
21869    /// denoting the name for the fields for stack start and stack end respectively. If a single
21870    /// string(e.g., `"val"`) is provided, the end field will be `"val_end"`.
21871    #[serde(rename = "as")]
21872    #[serde(skip_serializing_if = "Option::is_none")]
21873    #[builder(default)]
21874    pub transform_as: Option<LegendText>,
21875    /// An object indicating bin properties, or simply `true` for using default bin parameters.
21876    #[serde(skip_serializing_if = "Option::is_none")]
21877    #[builder(default)]
21878    pub bin: Option<AngleBin>,
21879    /// The data field to bin.
21880    ///
21881    /// The data field to apply time unit.
21882    #[serde(skip_serializing_if = "Option::is_none")]
21883    #[builder(default)]
21884    pub field: Option<String>,
21885    /// A [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string. Use
21886    /// the variable `datum` to refer to the current data object.
21887    #[serde(skip_serializing_if = "Option::is_none")]
21888    #[builder(default)]
21889    pub calculate: Option<String>,
21890    /// The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to zero,
21891    /// the bandwidth value is automatically estimated from the input data using Scott’s rule.
21892    ///
21893    /// A bandwidth parameter in the range `[0, 1]` that determines the amount of smoothing.
21894    ///
21895    /// __Default value:__ `0.3`
21896    #[serde(skip_serializing_if = "Option::is_none")]
21897    #[builder(default)]
21898    pub bandwidth: Option<f64>,
21899    /// A boolean flag indicating if the output values should be probability estimates (false) or
21900    /// smoothed counts (true).
21901    ///
21902    /// __Default value:__ `false`
21903    #[serde(skip_serializing_if = "Option::is_none")]
21904    #[builder(default)]
21905    pub counts: Option<bool>,
21906    /// A boolean flag indicating whether to produce density estimates (false) or cumulative
21907    /// density estimates (true).
21908    ///
21909    /// __Default value:__ `false`
21910    #[serde(skip_serializing_if = "Option::is_none")]
21911    #[builder(default)]
21912    pub cumulative: Option<bool>,
21913    /// The data field for which to perform density estimation.
21914    #[serde(skip_serializing_if = "Option::is_none")]
21915    #[builder(default)]
21916    pub density: Option<String>,
21917    /// A [min, max] domain from which to sample the distribution. If unspecified, the extent
21918    /// will be determined by the observed minimum and maximum values of the density value
21919    /// field.
21920    ///
21921    /// The field of which to get the extent.
21922    ///
21923    /// A [min, max] domain over the independent (x) field for the starting and ending points of
21924    /// the generated trend line.
21925    #[serde(skip_serializing_if = "Option::is_none")]
21926    #[builder(default)]
21927    pub extent: Option<TransformExtent>,
21928    /// The maximum number of samples to take along the extent domain for plotting the density.
21929    ///
21930    /// __Default value:__ `200`
21931    #[serde(skip_serializing_if = "Option::is_none")]
21932    #[builder(default)]
21933    pub maxsteps: Option<f64>,
21934    /// The minimum number of samples to take along the extent domain for plotting the density.
21935    ///
21936    /// __Default value:__ `25`
21937    #[serde(skip_serializing_if = "Option::is_none")]
21938    #[builder(default)]
21939    pub minsteps: Option<f64>,
21940    /// Indicates how parameters for multiple densities should be resolved. If `"independent"`,
21941    /// each density may have its own domain extent and dynamic number of curve sample steps. If
21942    /// `"shared"`, the KDE transform will ensure that all densities are defined over a shared
21943    /// domain and curve steps, enabling stacking.
21944    ///
21945    /// __Default value:__ `"shared"`
21946    #[serde(skip_serializing_if = "Option::is_none")]
21947    #[builder(default)]
21948    pub resolve: Option<ResolveMode>,
21949    /// The exact number of samples to take along the extent domain for plotting the density. If
21950    /// specified, overrides both minsteps and maxsteps to set an exact number of uniform
21951    /// samples. Potentially useful in conjunction with a fixed extent to ensure consistent
21952    /// sample points for stacked densities.
21953    #[serde(skip_serializing_if = "Option::is_none")]
21954    #[builder(default)]
21955    pub steps: Option<f64>,
21956    /// The output parameter produced by the extent transform.
21957    #[serde(skip_serializing_if = "Option::is_none")]
21958    #[builder(default)]
21959    pub param: Option<String>,
21960    /// The `filter` property must be a predication definition, which can take one of the
21961    /// following forms:
21962    ///
21963    /// 1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string,
21964    /// where `datum` can be used to refer to the current data object. For example, `{filter:
21965    /// "datum.b2 > 60"}` would make the output data includes only items that have values in the
21966    /// field `b2` over 60.
21967    ///
21968    /// 2) one of the [field
21969    /// predicates](https://vega.github.io/vega-lite/docs/predicate.html#field-predicate):
21970    /// [`equal`](https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate),
21971    /// [`lt`](https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate),
21972    /// [`lte`](https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate),
21973    /// [`gt`](https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate),
21974    /// [`gte`](https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate),
21975    /// [`range`](https://vega.github.io/vega-lite/docs/predicate.html#range-predicate),
21976    /// [`oneOf`](https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate), or
21977    /// [`valid`](https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate),
21978    ///
21979    /// 3) a [selection
21980    /// predicate](https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate),
21981    /// which define the names of a selection that the data point should belong to (or a logical
21982    /// composition of selections).
21983    ///
21984    /// 4) a [logical
21985    /// composition](https://vega.github.io/vega-lite/docs/predicate.html#composition) of (1),
21986    /// (2), or (3).
21987    #[serde(skip_serializing_if = "Option::is_none")]
21988    #[builder(default)]
21989    pub filter: Option<ConditionalValueDefNumberExprRefPredicateComposition>,
21990    /// An array of one or more data fields containing arrays to flatten. If multiple fields are
21991    /// specified, their array values should have a parallel structure, ideally with the same
21992    /// length. If the lengths of parallel arrays do not match, the longest array will be used
21993    /// with `null` values added for missing entries.
21994    #[serde(skip_serializing_if = "Option::is_none")]
21995    #[builder(default)]
21996    pub flatten: Option<Vec<String>>,
21997    /// An array of data fields indicating the properties to fold.
21998    #[serde(skip_serializing_if = "Option::is_none")]
21999    #[builder(default)]
22000    pub fold: Option<Vec<String>>,
22001    /// A frame specification as a two-element array used to control the window over which the
22002    /// specified method is applied. The array entries should either be a number indicating the
22003    /// offset from the current data object, or null to indicate unbounded rows preceding or
22004    /// following the current data object. For example, the value `[-5, 5]` indicates that the
22005    /// window should include five objects preceding and five objects following the current
22006    /// object.
22007    ///
22008    /// __Default value:__:  `[null, null]` indicating that the window includes all objects.
22009    ///
22010    /// A frame specification as a two-element array indicating how the sliding window should
22011    /// proceed. The array entries should either be a number indicating the offset from the
22012    /// current data object, or null to indicate unbounded rows preceding or following the
22013    /// current data object. The default value is `[null, 0]`, indicating that the sliding window
22014    /// includes the current object and all preceding objects. The value `[-5, 5]` indicates that
22015    /// the window should include five objects preceding and five objects following the current
22016    /// object. Finally, `[null, null]` indicates that the window frame should always include all
22017    /// data objects. If you this frame and want to assign the same value to add objects, you can
22018    /// use the simpler [join aggregate
22019    /// transform](https://vega.github.io/vega-lite/docs/joinaggregate.html). The only operators
22020    /// affected are the aggregation operations and the `first_value`, `last_value`, and
22021    /// `nth_value` window operations. The other window operations are not affected by this.
22022    ///
22023    /// __Default value:__:  `[null, 0]` (includes the current object and all preceding objects)
22024    #[serde(skip_serializing_if = "Option::is_none")]
22025    #[builder(default)]
22026    pub frame: Option<Vec<Option<f64>>>,
22027    /// The data field for which the missing values should be imputed.
22028    #[serde(skip_serializing_if = "Option::is_none")]
22029    #[builder(default)]
22030    pub impute: Option<String>,
22031    /// A key field that uniquely identifies data objects within a group. Missing key values
22032    /// (those occurring in the data but not in the current group) will be imputed.
22033    #[serde(skip_serializing_if = "Option::is_none")]
22034    #[builder(default)]
22035    pub key: Option<String>,
22036    /// Defines the key values that should be considered for imputation. An array of key values
22037    /// or an object defining a [number
22038    /// sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).
22039    ///
22040    /// If provided, this will be used in addition to the key values observed within the input
22041    /// data. If not provided, the values will be derived from all unique values of the `key`
22042    /// field. For `impute` in `encoding`, the key field is the x-field if the y-field is
22043    /// imputed, or vice versa.
22044    ///
22045    /// If there is no impute grouping, this property _must_ be specified.
22046    #[serde(skip_serializing_if = "Option::is_none")]
22047    #[builder(default)]
22048    pub keyvals: Option<Keyvals>,
22049    /// The imputation method to use for the field value of imputed data objects. One of
22050    /// `"value"`, `"mean"`, `"median"`, `"max"` or `"min"`.
22051    ///
22052    /// __Default value:__  `"value"`
22053    ///
22054    /// The functional form of the regression model. One of `"linear"`, `"log"`, `"exp"`,
22055    /// `"pow"`, `"quad"`, or `"poly"`.
22056    ///
22057    /// __Default value:__ `"linear"`
22058    #[serde(skip_serializing_if = "Option::is_none")]
22059    #[builder(default)]
22060    pub method: Option<TransformMethod>,
22061    /// The field value to use when the imputation `method` is `"value"`.
22062    ///
22063    /// The data field to populate pivoted fields. The aggregate values of this field become the
22064    /// values of the new pivoted fields.
22065    #[serde(skip_serializing_if = "Option::is_none")]
22066    #[builder(default)]
22067    pub value: Option<serde_json::Value>,
22068    /// The definition of the fields in the join aggregate, and what calculations to use.
22069    #[serde(skip_serializing_if = "Option::is_none")]
22070    #[builder(default)]
22071    pub joinaggregate: Option<Vec<JoinAggregateFieldDef>>,
22072    /// The data field of the dependent variable to smooth.
22073    #[serde(skip_serializing_if = "Option::is_none")]
22074    #[builder(default)]
22075    pub loess: Option<String>,
22076    /// The data field of the independent variable to use a predictor.
22077    #[serde(skip_serializing_if = "Option::is_none")]
22078    #[builder(default)]
22079    pub on: Option<String>,
22080    /// The default value to use if lookup fails.
22081    ///
22082    /// __Default value:__ `null`
22083    #[serde(rename = "default")]
22084    #[serde(skip_serializing_if = "Option::is_none")]
22085    #[builder(default)]
22086    pub transform_default: Option<serde_json::Value>,
22087    /// Data source or selection for secondary data reference.
22088    #[serde(skip_serializing_if = "Option::is_none")]
22089    #[builder(default)]
22090    pub from: Option<Lookup>,
22091    /// Key in primary data source.
22092    #[serde(skip_serializing_if = "Option::is_none")]
22093    #[builder(default)]
22094    pub lookup: Option<String>,
22095    /// An array of probabilities in the range (0, 1) for which to compute quantile values. If
22096    /// not specified, the *step* parameter will be used.
22097    #[serde(skip_serializing_if = "Option::is_none")]
22098    #[builder(default)]
22099    pub probs: Option<Vec<f64>>,
22100    /// The data field for which to perform quantile estimation.
22101    #[serde(skip_serializing_if = "Option::is_none")]
22102    #[builder(default)]
22103    pub quantile: Option<String>,
22104    /// A probability step size (default 0.01) for sampling quantile values. All values from
22105    /// one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used
22106    /// if the *probs* parameter is not provided.
22107    #[serde(skip_serializing_if = "Option::is_none")]
22108    #[builder(default)]
22109    pub step: Option<f64>,
22110    /// The polynomial order (number of coefficients) for the 'poly' method.
22111    ///
22112    /// __Default value:__ `3`
22113    #[serde(skip_serializing_if = "Option::is_none")]
22114    #[builder(default)]
22115    pub order: Option<f64>,
22116    /// A boolean flag indicating if the transform should return the regression model parameters
22117    /// (one object per group), rather than trend line points. The resulting objects include a
22118    /// `coef` array of fitted coefficient values (starting with the intercept term and then
22119    /// including terms of increasing order) and an `rSquared` value (indicating the total
22120    /// variance explained by the model).
22121    ///
22122    /// __Default value:__ `false`
22123    #[serde(skip_serializing_if = "Option::is_none")]
22124    #[builder(default)]
22125    pub params: Option<bool>,
22126    /// The data field of the dependent variable to predict.
22127    #[serde(skip_serializing_if = "Option::is_none")]
22128    #[builder(default)]
22129    pub regression: Option<String>,
22130    /// The timeUnit.
22131    #[serde(skip_serializing_if = "Option::is_none")]
22132    #[builder(default)]
22133    pub time_unit: Option<TransformTimeUnit>,
22134    /// The maximum number of data objects to include in the sample.
22135    ///
22136    /// __Default value:__ `1000`
22137    #[serde(skip_serializing_if = "Option::is_none")]
22138    #[builder(default)]
22139    pub sample: Option<f64>,
22140    /// Mode for stacking marks. One of `"zero"` (default), `"center"`, or `"normalize"`. The
22141    /// `"zero"` offset will stack starting at `0`. The `"center"` offset will center the stacks.
22142    /// The `"normalize"` offset will compute percentage values for each stack point, with output
22143    /// values in the range `[0,1]`.
22144    ///
22145    /// __Default value:__ `"zero"`
22146    #[serde(skip_serializing_if = "Option::is_none")]
22147    #[builder(default)]
22148    pub offset: Option<StackOffset>,
22149    /// Field that determines the order of leaves in the stacked charts.
22150    ///
22151    /// A sort field definition for sorting data objects within a window. If two data objects are
22152    /// considered equal by the comparator, they are considered "peer" values of equal rank. If
22153    /// sort is not specified, the order is undefined: data objects are processed in the order
22154    /// they are observed and none are considered peers (the ignorePeers parameter is ignored and
22155    /// treated as if set to `true`).
22156    #[serde(skip_serializing_if = "Option::is_none")]
22157    #[builder(default)]
22158    pub sort: Option<Vec<SortField>>,
22159    /// The field which is stacked.
22160    #[serde(skip_serializing_if = "Option::is_none")]
22161    #[builder(default)]
22162    pub stack: Option<String>,
22163    /// Indicates if the sliding window frame should ignore peer values (data that are considered
22164    /// identical by the sort criteria). The default is false, causing the window frame to expand
22165    /// to include all peer values. If set to true, the window frame will be defined by offset
22166    /// values only. This setting only affects those operations that depend on the window frame,
22167    /// namely aggregation operations and the first_value, last_value, and nth_value window
22168    /// operations.
22169    ///
22170    /// __Default value:__ `false`
22171    #[serde(skip_serializing_if = "Option::is_none")]
22172    #[builder(default)]
22173    pub ignore_peers: Option<bool>,
22174    /// The definition of the fields in the window, and what calculations to use.
22175    #[serde(skip_serializing_if = "Option::is_none")]
22176    #[builder(default)]
22177    pub window: Option<Vec<WindowFieldDef>>,
22178    /// An optional parameter indicating the maximum number of pivoted fields to generate. The
22179    /// default (`0`) applies no limit. The pivoted `pivot` names are sorted in ascending order
22180    /// prior to enforcing the limit. __Default value:__ `0`
22181    #[serde(skip_serializing_if = "Option::is_none")]
22182    #[builder(default)]
22183    pub limit: Option<f64>,
22184    /// The aggregation operation to apply to grouped `value` field values. __Default value:__
22185    /// `sum`
22186    #[serde(skip_serializing_if = "Option::is_none")]
22187    #[builder(default)]
22188    pub op: Option<AggregateOp>,
22189    /// The data field to pivot on. The unique values of this field become new field names in the
22190    /// output stream.
22191    #[serde(skip_serializing_if = "Option::is_none")]
22192    #[builder(default)]
22193    pub pivot: Option<String>,
22194}
22195
22196#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
22197#[builder(setter(into, strip_option))]
22198pub struct AggregatedFieldDef {
22199    /// The output field names to use for each aggregated field.
22200    #[serde(rename = "as")]
22201    #[serde(skip_serializing_if = "Option::is_none")]
22202    #[builder(default)]
22203    pub aggregated_field_def_as: Option<String>,
22204    /// The data field for which to compute aggregate function. This is required for all
22205    /// aggregation operations except `"count"`.
22206    #[serde(skip_serializing_if = "Option::is_none")]
22207    #[builder(default)]
22208    pub field: Option<String>,
22209    /// The aggregation operation to apply to the fields (e.g., `"sum"`, `"average"`, or
22210    /// `"count"`). See the [full list of supported aggregation
22211    /// operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops) for more
22212    /// information.
22213    #[serde(skip_serializing_if = "Option::is_none")]
22214    #[builder(default)]
22215    pub op: Option<AggregateOp>,
22216}
22217
22218/// The aggregation operation to apply to the fields (e.g., `"sum"`, `"average"`, or
22219/// `"count"`). See the [full list of supported aggregation
22220/// operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops) for more
22221/// information.
22222///
22223/// The aggregation operation to apply (e.g., `"sum"`, `"average"` or `"count"`). See the
22224/// list of all supported operations
22225/// [here](https://vega.github.io/vega-lite/docs/aggregate.html#ops).
22226///
22227/// The aggregation operation to apply to grouped `value` field values. __Default value:__
22228/// `sum`
22229#[derive(Debug, Clone, Serialize, Deserialize)]
22230#[serde(rename_all = "snake_case")]
22231pub enum AggregateOp {
22232    Argmax,
22233    Argmin,
22234    Average,
22235    Ci0,
22236    Ci1,
22237    Count,
22238    Distinct,
22239    Exponential,
22240    Exponentialb,
22241    Max,
22242    Mean,
22243    Median,
22244    Min,
22245    Missing,
22246    Product,
22247    Q1,
22248    Q3,
22249    Stderr,
22250    Stdev,
22251    Stdevp,
22252    Sum,
22253    Valid,
22254    Values,
22255    Variance,
22256    Variancep,
22257}
22258
22259#[derive(Debug, Clone, Serialize, Deserialize)]
22260#[serde(untagged)]
22261#[derive(From)]
22262pub enum TransformExtent {
22263    DoubleArray(Vec<f64>),
22264    String(String),
22265}
22266
22267/// Data source or selection for secondary data reference.
22268#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
22269#[builder(setter(into, strip_option))]
22270pub struct Lookup {
22271    /// Secondary data source to lookup in.
22272    #[serde(skip_serializing_if = "Option::is_none")]
22273    #[builder(default)]
22274    pub data: Option<Data>,
22275    /// Fields in foreign data or selection to lookup. If not specified, the entire object is
22276    /// queried.
22277    #[serde(skip_serializing_if = "Option::is_none")]
22278    #[builder(default)]
22279    pub fields: Option<Vec<String>>,
22280    /// Key in data to lookup.
22281    #[serde(skip_serializing_if = "Option::is_none")]
22282    #[builder(default)]
22283    pub key: Option<String>,
22284    /// Selection parameter name to look up.
22285    #[serde(skip_serializing_if = "Option::is_none")]
22286    #[builder(default)]
22287    pub param: Option<String>,
22288}
22289
22290/// Secondary data source to lookup in.
22291#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
22292#[builder(setter(into, strip_option))]
22293pub struct Data {
22294    /// An object that specifies the format for parsing the data.
22295    #[serde(skip_serializing_if = "Option::is_none")]
22296    #[builder(default)]
22297    pub format: Option<DataFormat>,
22298    /// Provide a placeholder name and bind data at runtime.
22299    ///
22300    /// Provide a placeholder name and bind data at runtime.
22301    ///
22302    /// New data may change the layout but Vega does not always resize the chart. To update the
22303    /// layout when the data updates, set
22304    /// [autosize](https://vega.github.io/vega-lite/docs/size.html#autosize) or explicitly use
22305    /// [view.resize](https://vega.github.io/vega/docs/api/view/#view_resize).
22306    #[serde(skip_serializing_if = "Option::is_none")]
22307    #[builder(default)]
22308    pub name: Option<String>,
22309    /// An URL from which to load the data set. Use the `format.type` property to ensure the
22310    /// loaded data is correctly parsed.
22311    #[serde(skip_serializing_if = "Option::is_none")]
22312    #[builder(default)]
22313    pub url: Option<String>,
22314    /// The full data set, included inline. This can be an array of objects or primitive values,
22315    /// an object, or a string. Arrays of primitive values are ingested as objects with a `data`
22316    /// property. Strings are parsed according to the specified format type.
22317    #[serde(skip_serializing_if = "Option::is_none")]
22318    #[builder(default)]
22319    pub values: Option<UrlDataInlineDataset>,
22320    /// Generate a sequence of numbers.
22321    #[serde(skip_serializing_if = "Option::is_none")]
22322    #[builder(default)]
22323    pub sequence: Option<SequenceParams>,
22324    /// Generate sphere GeoJSON data for the full globe.
22325    #[serde(skip_serializing_if = "Option::is_none")]
22326    #[builder(default)]
22327    pub sphere: Option<SphereUnion>,
22328    /// Generate graticule GeoJSON data for geographic reference lines.
22329    #[serde(skip_serializing_if = "Option::is_none")]
22330    #[builder(default)]
22331    pub graticule: Option<Graticule>,
22332}
22333
22334#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
22335#[builder(setter(into, strip_option))]
22336pub struct JoinAggregateFieldDef {
22337    /// The output name for the join aggregate operation.
22338    #[serde(rename = "as")]
22339    #[serde(skip_serializing_if = "Option::is_none")]
22340    #[builder(default)]
22341    pub join_aggregate_field_def_as: Option<String>,
22342    /// The data field for which to compute the aggregate function. This can be omitted for
22343    /// functions that do not operate over a field such as `"count"`.
22344    #[serde(skip_serializing_if = "Option::is_none")]
22345    #[builder(default)]
22346    pub field: Option<String>,
22347    /// The aggregation operation to apply (e.g., `"sum"`, `"average"` or `"count"`). See the
22348    /// list of all supported operations
22349    /// [here](https://vega.github.io/vega-lite/docs/aggregate.html#ops).
22350    #[serde(skip_serializing_if = "Option::is_none")]
22351    #[builder(default)]
22352    pub op: Option<AggregateOp>,
22353}
22354
22355/// The imputation method to use for the field value of imputed data objects. One of
22356/// `"value"`, `"mean"`, `"median"`, `"max"` or `"min"`.
22357///
22358/// __Default value:__  `"value"`
22359///
22360/// The functional form of the regression model. One of `"linear"`, `"log"`, `"exp"`,
22361/// `"pow"`, `"quad"`, or `"poly"`.
22362///
22363/// __Default value:__ `"linear"`
22364#[derive(Debug, Clone, Serialize, Deserialize)]
22365#[serde(rename_all = "snake_case")]
22366pub enum TransformMethod {
22367    Exp,
22368    Linear,
22369    Log,
22370    Max,
22371    Mean,
22372    Median,
22373    Min,
22374    Poly,
22375    Pow,
22376    Quad,
22377    Value,
22378}
22379
22380/// A sort definition for transform
22381#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
22382#[builder(setter(into, strip_option))]
22383pub struct SortField {
22384    /// The name of the field to sort.
22385    #[serde(skip_serializing_if = "Option::is_none")]
22386    #[builder(default)]
22387    pub field: Option<String>,
22388    /// Whether to sort the field in ascending or descending order. One of `"ascending"`
22389    /// (default), `"descending"`, or `null` (no not sort).
22390    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
22391    #[builder(default)]
22392    pub order: RemovableValue<SortOrder>,
22393}
22394
22395/// The timeUnit.
22396#[derive(Debug, Clone, Serialize, Deserialize)]
22397#[serde(untagged)]
22398#[derive(From)]
22399pub enum TransformTimeUnit {
22400    Enum(TimeUnit),
22401    TimeUnitTransformParams(TimeUnitTransformParams),
22402}
22403
22404#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
22405#[builder(setter(into, strip_option))]
22406pub struct TimeUnitTransformParams {
22407    /// If no `unit` is specified, maxbins is used to infer time units.
22408    #[serde(skip_serializing_if = "Option::is_none")]
22409    #[builder(default)]
22410    pub maxbins: Option<f64>,
22411    /// The number of steps between bins, in terms of the least significant unit provided.
22412    #[serde(skip_serializing_if = "Option::is_none")]
22413    #[builder(default)]
22414    pub step: Option<f64>,
22415    /// Defines how date-time values should be binned.
22416    #[serde(skip_serializing_if = "Option::is_none")]
22417    #[builder(default)]
22418    pub unit: Option<TimeUnit>,
22419    /// True to use UTC timezone. Equivalent to using a `utc` prefixed `TimeUnit`.
22420    #[serde(skip_serializing_if = "Option::is_none")]
22421    #[builder(default)]
22422    pub utc: Option<bool>,
22423}
22424
22425#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
22426#[builder(setter(into, strip_option))]
22427pub struct WindowFieldDef {
22428    /// The output name for the window operation.
22429    #[serde(rename = "as")]
22430    #[serde(skip_serializing_if = "Option::is_none")]
22431    #[builder(default)]
22432    pub window_field_def_as: Option<String>,
22433    /// The data field for which to compute the aggregate or window function. This can be omitted
22434    /// for window functions that do not operate over a field such as `"count"`, `"rank"`,
22435    /// `"dense_rank"`.
22436    #[serde(skip_serializing_if = "Option::is_none")]
22437    #[builder(default)]
22438    pub field: Option<String>,
22439    /// The window or aggregation operation to apply within a window (e.g., `"rank"`, `"lead"`,
22440    /// `"sum"`, `"average"` or `"count"`). See the list of all supported operations
22441    /// [here](https://vega.github.io/vega-lite/docs/window.html#ops).
22442    #[serde(skip_serializing_if = "Option::is_none")]
22443    #[builder(default)]
22444    pub op: Option<Op>,
22445    /// Parameter values for the window functions. Parameter values can be omitted for operations
22446    /// that do not accept a parameter.
22447    ///
22448    /// See the list of all supported operations and their parameters
22449    /// [here](https://vega.github.io/vega-lite/docs/transforms/window.html).
22450    #[serde(skip_serializing_if = "Option::is_none")]
22451    #[builder(default)]
22452    pub param: Option<f64>,
22453}
22454
22455/// The window or aggregation operation to apply within a window (e.g., `"rank"`, `"lead"`,
22456/// `"sum"`, `"average"` or `"count"`). See the list of all supported operations
22457/// [here](https://vega.github.io/vega-lite/docs/window.html#ops).
22458///
22459/// The aggregation operation to apply to the fields (e.g., `"sum"`, `"average"`, or
22460/// `"count"`). See the [full list of supported aggregation
22461/// operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops) for more
22462/// information.
22463///
22464/// The aggregation operation to apply (e.g., `"sum"`, `"average"` or `"count"`). See the
22465/// list of all supported operations
22466/// [here](https://vega.github.io/vega-lite/docs/aggregate.html#ops).
22467///
22468/// The aggregation operation to apply to grouped `value` field values. __Default value:__
22469/// `sum`
22470#[derive(Debug, Clone, Serialize, Deserialize)]
22471#[serde(rename_all = "snake_case")]
22472pub enum Op {
22473    Argmax,
22474    Argmin,
22475    Average,
22476    Ci0,
22477    Ci1,
22478    Count,
22479    #[serde(rename = "cume_dist")]
22480    CumeDist,
22481    #[serde(rename = "dense_rank")]
22482    DenseRank,
22483    Distinct,
22484    Exponential,
22485    Exponentialb,
22486    #[serde(rename = "first_value")]
22487    FirstValue,
22488    Lag,
22489    #[serde(rename = "last_value")]
22490    LastValue,
22491    Lead,
22492    Max,
22493    Mean,
22494    Median,
22495    Min,
22496    Missing,
22497    #[serde(rename = "nth_value")]
22498    NthValue,
22499    Ntile,
22500    #[serde(rename = "percent_rank")]
22501    PercentRank,
22502    Product,
22503    Q1,
22504    Q3,
22505    Rank,
22506    #[serde(rename = "row_number")]
22507    RowNumber,
22508    Stderr,
22509    Stdev,
22510    Stdevp,
22511    Sum,
22512    Valid,
22513    Values,
22514    Variance,
22515    Variancep,
22516}
22517
22518/// An object defining the view background's fill and stroke.
22519///
22520/// __Default value:__ none (transparent)
22521#[derive(Debug, Clone, Serialize, Deserialize)]
22522#[serde(rename_all = "camelCase")]
22523#[derive(Default, Builder)]
22524#[builder(setter(into, strip_option))]
22525pub struct ViewBackground {
22526    #[serde(skip_serializing_if = "Option::is_none")]
22527    #[builder(default)]
22528    pub corner_radius: Option<CornerRadiusUnion>,
22529    /// The mouse cursor used over the view. Any valid [CSS cursor
22530    /// type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
22531    #[serde(skip_serializing_if = "Option::is_none")]
22532    #[builder(default)]
22533    pub cursor: Option<Cursor>,
22534    /// The fill color.
22535    ///
22536    /// __Default value:__ `undefined`
22537    #[serde(skip_serializing_if = "Option::is_none")]
22538    #[builder(default)]
22539    pub fill: Option<Box<Color>>,
22540    #[serde(skip_serializing_if = "Option::is_none")]
22541    #[builder(default)]
22542    pub fill_opacity: Option<Opacity>,
22543    /// The overall opacity (value between [0,1]).
22544    ///
22545    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
22546    /// `square` marks or layered `bar` charts and `1` otherwise.
22547    #[serde(skip_serializing_if = "Option::is_none")]
22548    #[builder(default)]
22549    pub opacity: Option<CornerRadiusUnion>,
22550    /// The stroke color.
22551    ///
22552    /// __Default value:__ `"#ddd"`
22553    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
22554    #[builder(default)]
22555    pub stroke: RemovableValue<Color>,
22556    #[serde(skip_serializing_if = "Option::is_none")]
22557    #[builder(default)]
22558    pub stroke_cap: Option<Cap>,
22559    #[serde(skip_serializing_if = "Option::is_none")]
22560    #[builder(default)]
22561    pub stroke_dash: Option<StrokeDashUnion>,
22562    #[serde(skip_serializing_if = "Option::is_none")]
22563    #[builder(default)]
22564    pub stroke_dash_offset: Option<CornerRadiusUnion>,
22565    #[serde(skip_serializing_if = "Option::is_none")]
22566    #[builder(default)]
22567    pub stroke_join: Option<StrokeJoinUnion>,
22568    #[serde(skip_serializing_if = "Option::is_none")]
22569    #[builder(default)]
22570    pub stroke_miter_limit: Option<CornerRadiusUnion>,
22571    #[serde(skip_serializing_if = "Option::is_none")]
22572    #[builder(default)]
22573    pub stroke_opacity: Option<Opacity>,
22574    #[serde(skip_serializing_if = "Option::is_none")]
22575    #[builder(default)]
22576    pub stroke_width: Option<FontSize>,
22577    /// A string or array of strings indicating the name of custom styles to apply to the view
22578    /// background. A style is a named collection of mark property defaults defined within the
22579    /// [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If
22580    /// style is an array, later styles will override earlier styles.
22581    ///
22582    /// __Default value:__ `"cell"` __Note:__ Any specified view background properties will
22583    /// augment the default style.
22584    #[serde(skip_serializing_if = "Option::is_none")]
22585    #[builder(default)]
22586    pub style: Option<LegendText>,
22587}
22588
22589#[derive(Debug, Clone, Serialize, Deserialize)]
22590#[serde(untagged)]
22591#[derive(From)]
22592pub enum RepeatUnion {
22593    RepeatMapping(RepeatMapping),
22594    StringArray(Vec<String>),
22595}
22596
22597/// Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If
22598/// `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The
22599/// repeated views are laid out in a wrapped row. You can set the number of columns to
22600/// control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed
22601/// fields to be repeated along the particular orientations. The objects `{"repeat": "row"}`
22602/// and `{"repeat": "column"}` can be used to refer to the repeated field respectively.
22603#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
22604#[builder(setter(into, strip_option))]
22605pub struct RepeatMapping {
22606    /// An array of fields to be repeated horizontally.
22607    #[serde(skip_serializing_if = "Option::is_none")]
22608    #[builder(default)]
22609    pub column: Option<Vec<String>>,
22610    /// An array of fields to be repeated vertically.
22611    #[serde(skip_serializing_if = "Option::is_none")]
22612    #[builder(default)]
22613    pub row: Option<Vec<String>>,
22614    /// An array of fields to be repeated as layers.
22615    #[serde(skip_serializing_if = "Option::is_none")]
22616    #[builder(default)]
22617    pub layer: Option<Vec<String>>,
22618}
22619
22620/// A key-value mapping between encoding channels and definition of fields.
22621///
22622/// A shared key-value mapping between encoding channels and definition of fields in the
22623/// underlying layers.
22624#[derive(Debug, Clone, Serialize, Deserialize)]
22625#[serde(rename_all = "camelCase")]
22626#[derive(Default, Builder)]
22627#[builder(setter(into, strip_option))]
22628pub struct EdEncoding {
22629    /// Rotation angle of point and text marks.
22630    #[serde(skip_serializing_if = "Option::is_none")]
22631    #[builder(default)]
22632    pub angle: Option<AngleClass>,
22633    /// Color of the marks – either fill or stroke color based on  the `filled` property of mark
22634    /// definition. By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`,
22635    /// `"text"`, `"trail"`, `"circle"`, and `"square"` / stroke color for `"line"` and
22636    /// `"point"`.
22637    ///
22638    /// __Default value:__ If undefined, the default color depends on [mark
22639    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
22640    /// property.
22641    ///
22642    /// _Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please
22643    /// use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher
22644    /// precedence than `color`, thus may override the `color` encoding if conflicting encodings
22645    /// are specified. 2) See the scale documentation for more information about customizing
22646    /// [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).
22647    #[serde(skip_serializing_if = "Option::is_none")]
22648    #[builder(default)]
22649    pub color: Option<ColorClass>,
22650    /// A field definition for the horizontal facet of trellis plots.
22651    #[serde(skip_serializing_if = "Option::is_none")]
22652    #[builder(default)]
22653    pub column: Option<RowColumnEncodingFieldDef>,
22654    /// A text description of this mark for ARIA accessibility (SVG output only). For SVG output
22655    /// the `"aria-label"` attribute will be set to this description.
22656    #[serde(skip_serializing_if = "Option::is_none")]
22657    #[builder(default)]
22658    pub description: Option<DescriptionClass>,
22659    /// Additional levels of detail for grouping data in aggregate views and in line, trail, and
22660    /// area marks without mapping data to a specific visual channel.
22661    #[serde(skip_serializing_if = "Option::is_none")]
22662    #[builder(default)]
22663    pub detail: Option<Detail>,
22664    /// A field definition for the (flexible) facet of trellis plots.
22665    ///
22666    /// If either `row` or `column` is specified, this channel will be ignored.
22667    #[serde(skip_serializing_if = "Option::is_none")]
22668    #[builder(default)]
22669    pub facet: Option<FacetEncodingFieldDef>,
22670    /// Fill color of the marks. __Default value:__ If undefined, the default color depends on
22671    /// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
22672    /// property.
22673    ///
22674    /// _Note:_ The `fill` encoding has higher precedence than `color`, thus may override the
22675    /// `color` encoding if conflicting encodings are specified.
22676    #[serde(skip_serializing_if = "Option::is_none")]
22677    #[builder(default)]
22678    pub fill: Option<FillClass>,
22679    /// Fill opacity of the marks.
22680    ///
22681    /// __Default value:__ If undefined, the default opacity depends on [mark
22682    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity`
22683    /// property.
22684    #[serde(skip_serializing_if = "Option::is_none")]
22685    #[builder(default)]
22686    pub fill_opacity: Option<FillOpacityClass>,
22687    /// A URL to load upon mouse click.
22688    #[serde(skip_serializing_if = "Option::is_none")]
22689    #[builder(default)]
22690    pub href: Option<HrefClass>,
22691    /// A data field to use as a unique key for data binding. When a visualization’s data is
22692    /// updated, the key value will be used to match data elements to existing mark instances.
22693    /// Use a key channel to enable object constancy for transitions over dynamic data.
22694    #[serde(skip_serializing_if = "Option::is_none")]
22695    #[builder(default)]
22696    pub key: Option<KeyClass>,
22697    /// Latitude position of geographically projected marks.
22698    #[serde(skip_serializing_if = "Option::is_none")]
22699    #[builder(default)]
22700    pub latitude: Option<LatitudeClass>,
22701    /// Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and
22702    /// `"rule"`.
22703    #[serde(skip_serializing_if = "Option::is_none")]
22704    #[builder(default)]
22705    pub latitude2: Option<Latitude2Class>,
22706    /// Longitude position of geographically projected marks.
22707    #[serde(skip_serializing_if = "Option::is_none")]
22708    #[builder(default)]
22709    pub longitude: Option<LongitudeClass>,
22710    /// Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`,
22711    /// and  `"rule"`.
22712    #[serde(skip_serializing_if = "Option::is_none")]
22713    #[builder(default)]
22714    pub longitude2: Option<Longitude2Class>,
22715    /// Opacity of the marks.
22716    ///
22717    /// __Default value:__ If undefined, the default opacity depends on [mark
22718    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity`
22719    /// property.
22720    #[serde(skip_serializing_if = "Option::is_none")]
22721    #[builder(default)]
22722    pub opacity: Option<OpacityClass>,
22723    /// Order of the marks.
22724    /// - For stacked marks, this `order` channel encodes [stack
22725    /// order](https://vega.github.io/vega-lite/docs/stack.html#order).
22726    /// - For line and trail marks, this `order` channel encodes order of data points in the
22727    /// lines. This can be useful for creating [a connected
22728    /// scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html).
22729    /// Setting `order` to `{"value": null}` makes the line marks use the original order in the
22730    /// data sources.
22731    /// - Otherwise, this `order` channel encodes layer order of the marks.
22732    ///
22733    /// __Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating
22734    /// additional aggregation grouping.
22735    #[serde(skip_serializing_if = "Option::is_none")]
22736    #[builder(default)]
22737    pub order: Option<Order>,
22738    /// The outer radius in pixels of arc marks.
22739    #[serde(skip_serializing_if = "Option::is_none")]
22740    #[builder(default)]
22741    pub radius: Option<RadiusClass>,
22742    /// The inner radius in pixels of arc marks.
22743    #[serde(skip_serializing_if = "Option::is_none")]
22744    #[builder(default)]
22745    pub radius2: Option<Radius2Class>,
22746    /// A field definition for the vertical facet of trellis plots.
22747    #[serde(skip_serializing_if = "Option::is_none")]
22748    #[builder(default)]
22749    pub row: Option<RowColumnEncodingFieldDef>,
22750    /// Shape of the mark.
22751    ///
22752    /// 1. For `point` marks the supported values include:   - plotting shapes: `"circle"`,
22753    /// `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`,
22754    /// `"triangle-right"`, or `"triangle-left"`.   - the line symbol `"stroke"`   - centered
22755    /// directional shapes `"arrow"`, `"wedge"`, or `"triangle"`   - a custom [SVG path
22756    /// string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct
22757    /// sizing, custom shape paths should be defined within a square bounding box with
22758    /// coordinates ranging from -1 to 1 along both the x and y dimensions.)
22759    ///
22760    /// 2. For `geoshape` marks it should be a field definition of the geojson data
22761    ///
22762    /// __Default value:__ If undefined, the default shape depends on [mark
22763    /// config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape`
22764    /// property. (`"circle"` if unset.)
22765    #[serde(skip_serializing_if = "Option::is_none")]
22766    #[builder(default)]
22767    pub shape: Option<MarkPropDefStringNullTypeForShape>,
22768    /// Size of the mark.
22769    /// - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark.
22770    /// - For `"bar"` and `"tick"` – the bar and tick's size.
22771    /// - For `"text"` – the text's font size.
22772    /// - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of
22773    /// line with varying size)
22774    #[serde(skip_serializing_if = "Option::is_none")]
22775    #[builder(default)]
22776    pub size: Option<SizeClass>,
22777    /// Stroke color of the marks. __Default value:__ If undefined, the default color depends on
22778    /// [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color`
22779    /// property.
22780    ///
22781    /// _Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the
22782    /// `color` encoding if conflicting encodings are specified.
22783    #[serde(skip_serializing_if = "Option::is_none")]
22784    #[builder(default)]
22785    pub stroke: Option<StrokeClass>,
22786    /// Stroke dash of the marks.
22787    ///
22788    /// __Default value:__ `[1,0]` (No dash).
22789    #[serde(skip_serializing_if = "Option::is_none")]
22790    #[builder(default)]
22791    pub stroke_dash: Option<MarkPropDefNumber>,
22792    /// Stroke opacity of the marks.
22793    ///
22794    /// __Default value:__ If undefined, the default opacity depends on [mark
22795    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity`
22796    /// property.
22797    #[serde(skip_serializing_if = "Option::is_none")]
22798    #[builder(default)]
22799    pub stroke_opacity: Option<StrokeOpacityClass>,
22800    /// Stroke width of the marks.
22801    ///
22802    /// __Default value:__ If undefined, the default stroke width depends on [mark
22803    /// config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth`
22804    /// property.
22805    #[serde(skip_serializing_if = "Option::is_none")]
22806    #[builder(default)]
22807    pub stroke_width: Option<StrokeWidthClass>,
22808    /// Text of the `text` mark.
22809    #[serde(skip_serializing_if = "Option::is_none")]
22810    #[builder(default)]
22811    pub text: Option<TextDef>,
22812    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
22813    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
22814    /// clockwise.)
22815    ///
22816    /// - For text marks, polar coordinate angle in radians.
22817    #[serde(skip_serializing_if = "Option::is_none")]
22818    #[builder(default)]
22819    pub theta: Option<ThetaClass>,
22820    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
22821    /// values proceed clockwise.
22822    #[serde(skip_serializing_if = "Option::is_none")]
22823    #[builder(default)]
22824    pub theta2: Option<Theta2Class>,
22825    #[serde(skip_serializing_if = "Option::is_none")]
22826    #[builder(default)]
22827    pub time: Option<TimeFieldDef>,
22828    /// The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the
22829    /// `tooltip` property in the mark
22830    /// definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
22831    ///
22832    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
22833    /// a detailed discussion about tooltip in Vega-Lite.
22834    #[serde(skip_serializing_if = "Option::is_none")]
22835    #[builder(default)]
22836    pub tooltip: Option<EncodingTooltip>,
22837    /// The URL of an image mark.
22838    #[serde(skip_serializing_if = "Option::is_none")]
22839    #[builder(default)]
22840    pub url: Option<UrlClass>,
22841    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
22842    /// `x2` or `width`.
22843    ///
22844    /// The `value` of this channel can be a number or a string `"width"` for the width of the
22845    /// plot.
22846    #[serde(skip_serializing_if = "Option::is_none")]
22847    #[builder(default)]
22848    pub x: Option<XClass>,
22849    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
22850    ///
22851    /// The `value` of this channel can be a number or a string `"width"` for the width of the
22852    /// plot.
22853    #[serde(skip_serializing_if = "Option::is_none")]
22854    #[builder(default)]
22855    pub x2: Option<X2Class>,
22856    /// Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
22857    #[serde(skip_serializing_if = "Option::is_none")]
22858    #[builder(default)]
22859    pub x_error: Option<XErrorClass>,
22860    /// Secondary error value of x coordinates for error specified `"errorbar"` and `"errorband"`.
22861    #[serde(skip_serializing_if = "Option::is_none")]
22862    #[builder(default)]
22863    pub x_error2: Option<XError2Class>,
22864    /// Offset of x-position of the marks
22865    #[serde(skip_serializing_if = "Option::is_none")]
22866    #[builder(default)]
22867    pub x_offset: Option<XOffsetClass>,
22868    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
22869    /// `y2` or `height`.
22870    ///
22871    /// The `value` of this channel can be a number or a string `"height"` for the height of the
22872    /// plot.
22873    #[serde(skip_serializing_if = "Option::is_none")]
22874    #[builder(default)]
22875    pub y: Option<YClass>,
22876    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
22877    ///
22878    /// The `value` of this channel can be a number or a string `"height"` for the height of the
22879    /// plot.
22880    #[serde(skip_serializing_if = "Option::is_none")]
22881    #[builder(default)]
22882    pub y2: Option<Y2Class>,
22883    /// Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
22884    #[serde(skip_serializing_if = "Option::is_none")]
22885    #[builder(default)]
22886    pub y_error: Option<YErrorClass>,
22887    /// Secondary error value of y coordinates for error specified `"errorbar"` and `"errorband"`.
22888    #[serde(skip_serializing_if = "Option::is_none")]
22889    #[builder(default)]
22890    pub y_error2: Option<YError2Class>,
22891    /// Offset of y-position of the marks
22892    #[serde(skip_serializing_if = "Option::is_none")]
22893    #[builder(default)]
22894    pub y_offset: Option<YOffsetClass>,
22895}
22896
22897/// Vega-Lite configuration object. This property can only be defined at the top-level of a
22898/// specification.
22899#[derive(Debug, Clone, Serialize, Deserialize)]
22900#[serde(rename_all = "camelCase")]
22901#[derive(Default, Builder)]
22902#[builder(setter(into, strip_option))]
22903pub struct ConfigClass {
22904    /// Arc-specific Config
22905    #[serde(skip_serializing_if = "Option::is_none")]
22906    #[builder(default)]
22907    pub arc: Option<RectConfig>,
22908    /// Area-Specific Config
22909    #[serde(skip_serializing_if = "Option::is_none")]
22910    #[builder(default)]
22911    pub area: Option<AreaConfig>,
22912    /// A boolean flag indicating if ARIA default attributes should be included for marks and
22913    /// guides (SVG output only). If false, the `"aria-hidden"` attribute will be set for all
22914    /// guides, removing them from the ARIA accessibility tree and Vega-Lite will not generate
22915    /// default descriptions for marks.
22916    ///
22917    /// __Default value:__ `true`.
22918    #[serde(skip_serializing_if = "Option::is_none")]
22919    #[builder(default)]
22920    pub aria: Option<bool>,
22921    /// How the visualization size should be determined. If a string, should be one of `"pad"`,
22922    /// `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing
22923    /// and automatic resizing.
22924    ///
22925    /// __Default value__: `pad`
22926    #[serde(skip_serializing_if = "Option::is_none")]
22927    #[builder(default)]
22928    pub autosize: Option<Box<Autosize>>,
22929    /// Axis configuration, which determines default properties for all `x` and `y`
22930    /// [axes](https://vega.github.io/vega-lite/docs/axis.html). For a full list of axis
22931    /// configuration options, please see the [corresponding section of the axis
22932    /// documentation](https://vega.github.io/vega-lite/docs/axis.html#config).
22933    #[serde(skip_serializing_if = "Option::is_none")]
22934    #[builder(default)]
22935    pub axis: Option<AxisConfig>,
22936    /// Config for axes with "band" scales.
22937    #[serde(skip_serializing_if = "Option::is_none")]
22938    #[builder(default)]
22939    pub axis_band: Option<AxisConfig>,
22940    /// Config for x-axis along the bottom edge of the chart.
22941    #[serde(skip_serializing_if = "Option::is_none")]
22942    #[builder(default)]
22943    pub axis_bottom: Option<AxisConfig>,
22944    /// Config for axes with "point" or "band" scales.
22945    #[serde(skip_serializing_if = "Option::is_none")]
22946    #[builder(default)]
22947    pub axis_discrete: Option<AxisConfig>,
22948    /// Config for y-axis along the left edge of the chart.
22949    #[serde(skip_serializing_if = "Option::is_none")]
22950    #[builder(default)]
22951    pub axis_left: Option<AxisConfig>,
22952    /// Config for axes with "point" scales.
22953    #[serde(skip_serializing_if = "Option::is_none")]
22954    #[builder(default)]
22955    pub axis_point: Option<AxisConfig>,
22956    /// Config for quantitative axes.
22957    #[serde(skip_serializing_if = "Option::is_none")]
22958    #[builder(default)]
22959    pub axis_quantitative: Option<AxisConfig>,
22960    /// Config for y-axis along the right edge of the chart.
22961    #[serde(skip_serializing_if = "Option::is_none")]
22962    #[builder(default)]
22963    pub axis_right: Option<AxisConfig>,
22964    /// Config for temporal axes.
22965    #[serde(skip_serializing_if = "Option::is_none")]
22966    #[builder(default)]
22967    pub axis_temporal: Option<AxisConfig>,
22968    /// Config for x-axis along the top edge of the chart.
22969    #[serde(skip_serializing_if = "Option::is_none")]
22970    #[builder(default)]
22971    pub axis_top: Option<AxisConfig>,
22972    /// X-axis specific config.
22973    #[serde(skip_serializing_if = "Option::is_none")]
22974    #[builder(default)]
22975    pub axis_x: Option<AxisConfig>,
22976    /// Config for x-axes with "band" scales.
22977    #[serde(skip_serializing_if = "Option::is_none")]
22978    #[builder(default)]
22979    pub axis_x_band: Option<AxisConfig>,
22980    /// Config for x-axes with "point" or "band" scales.
22981    #[serde(skip_serializing_if = "Option::is_none")]
22982    #[builder(default)]
22983    pub axis_x_discrete: Option<AxisConfig>,
22984    /// Config for x-axes with "point" scales.
22985    #[serde(skip_serializing_if = "Option::is_none")]
22986    #[builder(default)]
22987    pub axis_x_point: Option<AxisConfig>,
22988    /// Config for x-quantitative axes.
22989    #[serde(skip_serializing_if = "Option::is_none")]
22990    #[builder(default)]
22991    pub axis_x_quantitative: Option<AxisConfig>,
22992    /// Config for x-temporal axes.
22993    #[serde(skip_serializing_if = "Option::is_none")]
22994    #[builder(default)]
22995    pub axis_x_temporal: Option<AxisConfig>,
22996    /// Y-axis specific config.
22997    #[serde(skip_serializing_if = "Option::is_none")]
22998    #[builder(default)]
22999    pub axis_y: Option<AxisConfig>,
23000    /// Config for y-axes with "band" scales.
23001    #[serde(skip_serializing_if = "Option::is_none")]
23002    #[builder(default)]
23003    pub axis_y_band: Option<AxisConfig>,
23004    /// Config for y-axes with "point" or "band" scales.
23005    #[serde(skip_serializing_if = "Option::is_none")]
23006    #[builder(default)]
23007    pub axis_y_discrete: Option<AxisConfig>,
23008    /// Config for y-axes with "point" scales.
23009    #[serde(skip_serializing_if = "Option::is_none")]
23010    #[builder(default)]
23011    pub axis_y_point: Option<AxisConfig>,
23012    /// Config for y-quantitative axes.
23013    #[serde(skip_serializing_if = "Option::is_none")]
23014    #[builder(default)]
23015    pub axis_y_quantitative: Option<AxisConfig>,
23016    /// Config for y-temporal axes.
23017    #[serde(skip_serializing_if = "Option::is_none")]
23018    #[builder(default)]
23019    pub axis_y_temporal: Option<AxisConfig>,
23020    /// CSS color property to use as the background of the entire view.
23021    ///
23022    /// __Default value:__ `"white"`
23023    #[serde(skip_serializing_if = "Option::is_none")]
23024    #[builder(default)]
23025    pub background: Option<Box<Color>>,
23026    /// Bar-Specific Config
23027    #[serde(skip_serializing_if = "Option::is_none")]
23028    #[builder(default)]
23029    pub bar: Option<BarConfig>,
23030    /// Box Config
23031    #[serde(skip_serializing_if = "Option::is_none")]
23032    #[builder(default)]
23033    pub boxplot: Option<BoxPlotConfig>,
23034    /// Circle-Specific Config
23035    #[serde(skip_serializing_if = "Option::is_none")]
23036    #[builder(default)]
23037    pub circle: Option<MarkConfig>,
23038    /// Default configuration for all concatenation and repeat view composition operators
23039    /// (`concat`, `hconcat`, `vconcat`, and `repeat`)
23040    #[serde(skip_serializing_if = "Option::is_none")]
23041    #[builder(default)]
23042    pub concat: Option<CompositionConfig>,
23043    /// Default axis and legend title for count fields.
23044    ///
23045    /// __Default value:__ `'Count of Records`.
23046    #[serde(skip_serializing_if = "Option::is_none")]
23047    #[builder(default)]
23048    pub count_title: Option<String>,
23049    /// Allow the `formatType` property for text marks and guides to accept a custom formatter
23050    /// function [registered as a Vega
23051    /// expression](https://vega.github.io/vega-lite/usage/compile.html#format-type).
23052    #[serde(skip_serializing_if = "Option::is_none")]
23053    #[builder(default)]
23054    pub custom_format_types: Option<bool>,
23055    /// ErrorBand Config
23056    #[serde(skip_serializing_if = "Option::is_none")]
23057    #[builder(default)]
23058    pub errorband: Option<ErrorBandConfig>,
23059    /// ErrorBar Config
23060    #[serde(skip_serializing_if = "Option::is_none")]
23061    #[builder(default)]
23062    pub errorbar: Option<ErrorBarConfig>,
23063    /// Default configuration for the `facet` view composition operator
23064    #[serde(skip_serializing_if = "Option::is_none")]
23065    #[builder(default)]
23066    pub facet: Option<CompositionConfig>,
23067    /// Defines how Vega-Lite generates title for fields. There are three possible styles:
23068    /// - `"verbal"` (Default) - displays function in a verbal style (e.g., "Sum of field",
23069    /// "Year-month of date", "field (binned)").
23070    /// - `"function"` - displays function using parentheses and capitalized texts (e.g.,
23071    /// "SUM(field)", "YEARMONTH(date)", "BIN(field)").
23072    /// - `"plain"` - displays only the field name without functions (e.g., "field", "date",
23073    /// "field").
23074    #[serde(skip_serializing_if = "Option::is_none")]
23075    #[builder(default)]
23076    pub field_title: Option<FieldTitle>,
23077    /// Default font for all text marks, titles, and labels.
23078    #[serde(skip_serializing_if = "Option::is_none")]
23079    #[builder(default)]
23080    pub font: Option<String>,
23081    /// Geoshape-Specific Config
23082    #[serde(skip_serializing_if = "Option::is_none")]
23083    #[builder(default)]
23084    pub geoshape: Option<MarkConfig>,
23085    /// Header configuration, which determines default properties for all
23086    /// [headers](https://vega.github.io/vega-lite/docs/header.html).
23087    ///
23088    /// For a full list of header configuration options, please see the [corresponding section of
23089    /// in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).
23090    #[serde(skip_serializing_if = "Option::is_none")]
23091    #[builder(default)]
23092    pub header: Option<HeaderConfig>,
23093    /// Header configuration, which determines default properties for column
23094    /// [headers](https://vega.github.io/vega-lite/docs/header.html).
23095    ///
23096    /// For a full list of header configuration options, please see the [corresponding section of
23097    /// in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).
23098    #[serde(skip_serializing_if = "Option::is_none")]
23099    #[builder(default)]
23100    pub header_column: Option<HeaderConfig>,
23101    /// Header configuration, which determines default properties for non-row/column facet
23102    /// [headers](https://vega.github.io/vega-lite/docs/header.html).
23103    ///
23104    /// For a full list of header configuration options, please see the [corresponding section of
23105    /// in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).
23106    #[serde(skip_serializing_if = "Option::is_none")]
23107    #[builder(default)]
23108    pub header_facet: Option<HeaderConfig>,
23109    /// Header configuration, which determines default properties for row
23110    /// [headers](https://vega.github.io/vega-lite/docs/header.html).
23111    ///
23112    /// For a full list of header configuration options, please see the [corresponding section of
23113    /// in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).
23114    #[serde(skip_serializing_if = "Option::is_none")]
23115    #[builder(default)]
23116    pub header_row: Option<HeaderConfig>,
23117    /// Image-specific Config
23118    #[serde(skip_serializing_if = "Option::is_none")]
23119    #[builder(default)]
23120    pub image: Option<RectConfig>,
23121    /// Legend configuration, which determines default properties for all
23122    /// [legends](https://vega.github.io/vega-lite/docs/legend.html). For a full list of legend
23123    /// configuration options, please see the [corresponding section of in the legend
23124    /// documentation](https://vega.github.io/vega-lite/docs/legend.html#config).
23125    #[serde(skip_serializing_if = "Option::is_none")]
23126    #[builder(default)]
23127    pub legend: Option<LegendConfig>,
23128    /// Line-Specific Config
23129    #[serde(skip_serializing_if = "Option::is_none")]
23130    #[builder(default)]
23131    pub line: Option<LineConfig>,
23132    /// A delimiter, such as a newline character, upon which to break text strings into multiple
23133    /// lines. This property provides a global default for text marks, which is overridden by
23134    /// mark or style config settings, and by the lineBreak mark encoding channel. If
23135    /// signal-valued, either string or regular expression (regexp) values are valid.
23136    #[serde(skip_serializing_if = "Option::is_none")]
23137    #[builder(default)]
23138    pub line_break: Option<Box<Color>>,
23139    /// Locale definitions for string parsing and formatting of number and date values. The
23140    /// locale object should contain `number` and/or `time` properties with [locale
23141    /// definitions](https://vega.github.io/vega/docs/api/locale/). Locale definitions provided
23142    /// in the config block may be overridden by the View constructor locale option.
23143    #[serde(skip_serializing_if = "Option::is_none")]
23144    #[builder(default)]
23145    pub locale: Option<Locale>,
23146    /// Mark Config
23147    #[serde(skip_serializing_if = "Option::is_none")]
23148    #[builder(default)]
23149    pub mark: Option<MarkConfig>,
23150    /// If normalizedNumberFormatType is not specified, D3 number format for axis labels, text
23151    /// marks, and tooltips of normalized stacked fields (fields with `stack: "normalize"`). For
23152    /// example `"s"` for SI units. Use [D3's number format
23153    /// pattern](https://github.com/d3/d3-format#locale_format).
23154    ///
23155    /// If `config.normalizedNumberFormatType` is specified and `config.customFormatTypes` is
23156    /// `true`, this value will be passed as `format` alongside `datum.value` to the
23157    /// `config.numberFormatType` function. __Default value:__ `%`
23158    #[serde(skip_serializing_if = "Option::is_none")]
23159    #[builder(default)]
23160    pub normalized_number_format: Option<String>,
23161    /// [Custom format
23162    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for
23163    /// `config.normalizedNumberFormat`.
23164    ///
23165    /// __Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed
23166    /// as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format).
23167    /// __Note:__ You must also set `customFormatTypes` to `true` to use this feature.
23168    #[serde(skip_serializing_if = "Option::is_none")]
23169    #[builder(default)]
23170    pub normalized_number_format_type: Option<String>,
23171    /// If numberFormatType is not specified, D3 number format for guide labels, text marks, and
23172    /// tooltips of non-normalized fields (fields *without* `stack: "normalize"`). For example
23173    /// `"s"` for SI units. Use [D3's number format
23174    /// pattern](https://github.com/d3/d3-format#locale_format).
23175    ///
23176    /// If `config.numberFormatType` is specified and `config.customFormatTypes` is `true`, this
23177    /// value will be passed as `format` alongside `datum.value` to the `config.numberFormatType`
23178    /// function.
23179    #[serde(skip_serializing_if = "Option::is_none")]
23180    #[builder(default)]
23181    pub number_format: Option<String>,
23182    /// [Custom format
23183    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for
23184    /// `config.numberFormat`.
23185    ///
23186    /// __Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed
23187    /// as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format).
23188    /// __Note:__ You must also set `customFormatTypes` to `true` to use this feature.
23189    #[serde(skip_serializing_if = "Option::is_none")]
23190    #[builder(default)]
23191    pub number_format_type: Option<String>,
23192    /// The default visualization padding, in pixels, from the edge of the visualization canvas
23193    /// to the data rectangle. If a number, specifies padding for all sides. If an object, the
23194    /// value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify
23195    /// padding for each side of the visualization.
23196    ///
23197    /// __Default value__: `5`
23198    #[serde(skip_serializing_if = "Option::is_none")]
23199    #[builder(default)]
23200    pub padding: Option<Box<Padding>>,
23201    /// Dynamic variables or selections that parameterize a visualization.
23202    #[serde(skip_serializing_if = "Option::is_none")]
23203    #[builder(default)]
23204    pub params: Option<Vec<TopLevelParameter>>,
23205    /// Point-Specific Config
23206    #[serde(skip_serializing_if = "Option::is_none")]
23207    #[builder(default)]
23208    pub point: Option<MarkConfig>,
23209    /// Projection configuration, which determines default properties for all
23210    /// [projections](https://vega.github.io/vega-lite/docs/projection.html). For a full list of
23211    /// projection configuration options, please see the [corresponding section of the projection
23212    /// documentation](https://vega.github.io/vega-lite/docs/projection.html#config).
23213    #[serde(skip_serializing_if = "Option::is_none")]
23214    #[builder(default)]
23215    pub projection: Option<Box<Projection>>,
23216    /// An object hash that defines default range arrays or schemes for using with scales. For a
23217    /// full list of scale range configuration options, please see the [corresponding section of
23218    /// the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config).
23219    #[serde(skip_serializing_if = "Option::is_none")]
23220    #[builder(default)]
23221    pub range: Option<HashMap<String, RangeValue>>,
23222    /// Rect-Specific Config
23223    #[serde(skip_serializing_if = "Option::is_none")]
23224    #[builder(default)]
23225    pub rect: Option<RectConfig>,
23226    /// Rule-Specific Config
23227    #[serde(skip_serializing_if = "Option::is_none")]
23228    #[builder(default)]
23229    pub rule: Option<MarkConfig>,
23230    /// Scale configuration determines default properties for all
23231    /// [scales](https://vega.github.io/vega-lite/docs/scale.html). For a full list of scale
23232    /// configuration options, please see the [corresponding section of the scale
23233    /// documentation](https://vega.github.io/vega-lite/docs/scale.html#config).
23234    #[serde(skip_serializing_if = "Option::is_none")]
23235    #[builder(default)]
23236    pub scale: Option<ScaleConfig>,
23237    /// An object hash for defining default properties for each type of selections.
23238    #[serde(skip_serializing_if = "Option::is_none")]
23239    #[builder(default)]
23240    pub selection: Option<SelectionClass>,
23241    /// Square-Specific Config
23242    #[serde(skip_serializing_if = "Option::is_none")]
23243    #[builder(default)]
23244    pub square: Option<MarkConfig>,
23245    /// An object hash that defines key-value mappings to determine default properties for marks
23246    /// with a given [style](https://vega.github.io/vega-lite/docs/mark.html#mark-def). The keys
23247    /// represent styles names; the values have to be valid [mark configuration
23248    /// objects](https://vega.github.io/vega-lite/docs/mark.html#config).
23249    #[serde(skip_serializing_if = "Option::is_none")]
23250    #[builder(default)]
23251    pub style: Option<HashMap<String, StyleValue>>,
23252    /// Text-Specific Config
23253    #[serde(skip_serializing_if = "Option::is_none")]
23254    #[builder(default)]
23255    pub text: Option<MarkConfig>,
23256    /// Tick-Specific Config
23257    #[serde(skip_serializing_if = "Option::is_none")]
23258    #[builder(default)]
23259    pub tick: Option<TickConfig>,
23260    /// Default time format for raw time values (without time units) in text marks, legend labels
23261    /// and header labels.
23262    ///
23263    /// __Default value:__ `"%b %d, %Y"` __Note:__ Axes automatically determine the format for
23264    /// each label automatically so this config does not affect axes.
23265    #[serde(skip_serializing_if = "Option::is_none")]
23266    #[builder(default)]
23267    pub time_format: Option<String>,
23268    /// [Custom format
23269    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for
23270    /// `config.timeFormat`.
23271    ///
23272    /// __Default value:__ `undefined` -- This is equilvalent to call D3-time-format, which is
23273    /// exposed as [`timeFormat` in
23274    /// Vega-Expression](https://vega.github.io/vega/docs/expressions/#timeFormat). __Note:__ You
23275    /// must also set `customFormatTypes` to `true` and there must *not* be a `timeUnit` defined
23276    /// to use this feature.
23277    #[serde(skip_serializing_if = "Option::is_none")]
23278    #[builder(default)]
23279    pub time_format_type: Option<String>,
23280    /// Title configuration, which determines default properties for all
23281    /// [titles](https://vega.github.io/vega-lite/docs/title.html). For a full list of title
23282    /// configuration options, please see the [corresponding section of the title
23283    /// documentation](https://vega.github.io/vega-lite/docs/title.html#config).
23284    #[serde(skip_serializing_if = "Option::is_none")]
23285    #[builder(default)]
23286    pub title: Option<BaseTitleNoValueRefs>,
23287    /// Define [custom format
23288    /// configuration](https://vega.github.io/vega-lite/docs/config.html#format) for tooltips. If
23289    /// unspecified, default format config will be applied.
23290    #[serde(skip_serializing_if = "Option::is_none")]
23291    #[builder(default)]
23292    pub tooltip_format: Option<FormatConfig>,
23293    /// Trail-Specific Config
23294    #[serde(skip_serializing_if = "Option::is_none")]
23295    #[builder(default)]
23296    pub trail: Option<LineConfig>,
23297    /// Default properties for [single view
23298    /// plots](https://vega.github.io/vega-lite/docs/spec.html#single).
23299    #[serde(skip_serializing_if = "Option::is_none")]
23300    #[builder(default)]
23301    pub view: Option<ViewConfig>,
23302}
23303
23304/// Arc-specific Config
23305///
23306/// Image-specific Config
23307///
23308/// Rect-Specific Config
23309#[derive(Debug, Clone, Serialize, Deserialize)]
23310#[serde(rename_all = "camelCase")]
23311#[derive(Default, Builder)]
23312#[builder(setter(into, strip_option))]
23313pub struct RectConfig {
23314    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
23315    /// of `"left"`, `"right"`, `"center"`.
23316    ///
23317    /// __Note:__ Expression reference is *not* supported for range marks.
23318    #[serde(skip_serializing_if = "Option::is_none")]
23319    #[builder(default)]
23320    pub align: Option<TitleAlignUnion>,
23321    #[serde(skip_serializing_if = "Option::is_none")]
23322    #[builder(default)]
23323    pub angle: Option<Angle>,
23324    #[serde(skip_serializing_if = "Option::is_none")]
23325    #[builder(default)]
23326    pub aria: Option<Aria>,
23327    #[serde(skip_serializing_if = "Option::is_none")]
23328    #[builder(default)]
23329    pub aria_role: Option<Box<Color>>,
23330    #[serde(skip_serializing_if = "Option::is_none")]
23331    #[builder(default)]
23332    pub aria_role_description: Option<Box<Color>>,
23333    #[serde(skip_serializing_if = "Option::is_none")]
23334    #[builder(default)]
23335    pub aspect: Option<Aria>,
23336    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
23337    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
23338    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
23339    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
23340    /// rather than `fontSize` alone.
23341    ///
23342    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
23343    /// `"bottom"`.
23344    ///
23345    /// __Note:__ Expression reference is *not* supported for range marks.
23346    #[serde(skip_serializing_if = "Option::is_none")]
23347    #[builder(default)]
23348    pub baseline: Option<TextBaseline>,
23349    /// Offset between bars for binned field. The ideal value for this is either 0 (preferred by
23350    /// statisticians) or 1 (Vega-Lite default, D3 example style).
23351    ///
23352    /// __Default value:__ `1`
23353    #[serde(skip_serializing_if = "Option::is_none")]
23354    #[builder(default)]
23355    pub bin_spacing: Option<f64>,
23356    #[serde(skip_serializing_if = "Option::is_none")]
23357    #[builder(default)]
23358    pub blend: Option<BlendUnion>,
23359    /// Default color.
23360    ///
23361    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
23362    ///
23363    /// __Note:__
23364    /// - This property cannot be used in a [style
23365    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
23366    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
23367    /// override `color`.
23368    #[serde(skip_serializing_if = "Option::is_none")]
23369    #[builder(default)]
23370    pub color: Option<MarkConfigColor>,
23371    /// The default size of the bars on continuous scales.
23372    ///
23373    /// __Default value:__ `5`
23374    #[serde(skip_serializing_if = "Option::is_none")]
23375    #[builder(default)]
23376    pub continuous_band_size: Option<f64>,
23377    #[serde(skip_serializing_if = "Option::is_none")]
23378    #[builder(default)]
23379    pub corner_radius: Option<CornerRadiusUnion>,
23380    #[serde(skip_serializing_if = "Option::is_none")]
23381    #[builder(default)]
23382    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
23383    #[serde(skip_serializing_if = "Option::is_none")]
23384    #[builder(default)]
23385    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
23386    #[serde(skip_serializing_if = "Option::is_none")]
23387    #[builder(default)]
23388    pub corner_radius_top_left: Option<CornerRadiusUnion>,
23389    #[serde(skip_serializing_if = "Option::is_none")]
23390    #[builder(default)]
23391    pub corner_radius_top_right: Option<CornerRadiusUnion>,
23392    #[serde(skip_serializing_if = "Option::is_none")]
23393    #[builder(default)]
23394    pub cursor: Option<CursorUnion>,
23395    #[serde(skip_serializing_if = "Option::is_none")]
23396    #[builder(default)]
23397    pub description: Option<Box<Color>>,
23398    #[serde(skip_serializing_if = "Option::is_none")]
23399    #[builder(default)]
23400    pub dir: Option<Dir>,
23401    /// The default size of the bars with discrete dimensions. If unspecified, the default size
23402    /// is  `step-2`, which provides 2 pixel offset between bars.
23403    #[serde(skip_serializing_if = "Option::is_none")]
23404    #[builder(default)]
23405    pub discrete_band_size: Option<DiscreteBandSize>,
23406    #[serde(skip_serializing_if = "Option::is_none")]
23407    #[builder(default)]
23408    pub dx: Option<CornerRadiusUnion>,
23409    #[serde(skip_serializing_if = "Option::is_none")]
23410    #[builder(default)]
23411    pub dy: Option<CornerRadiusUnion>,
23412    #[serde(skip_serializing_if = "Option::is_none")]
23413    #[builder(default)]
23414    pub ellipsis: Option<Box<Color>>,
23415    #[serde(skip_serializing_if = "Option::is_none")]
23416    #[builder(default)]
23417    pub end_angle: Option<CornerRadiusUnion>,
23418    /// Default fill color. This property has higher precedence than `config.color`. Set to
23419    /// `null` to remove fill.
23420    ///
23421    /// __Default value:__ (None)
23422    #[serde(skip_serializing_if = "Option::is_none")]
23423    #[builder(default)]
23424    pub fill: Option<MarkConfigFill>,
23425    /// Whether the mark's color should be used as fill color instead of stroke color.
23426    ///
23427    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
23428    /// `geoshape` marks for
23429    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
23430    /// otherwise, `true`.
23431    ///
23432    /// __Note:__ This property cannot be used in a [style
23433    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
23434    #[serde(skip_serializing_if = "Option::is_none")]
23435    #[builder(default)]
23436    pub filled: Option<bool>,
23437    #[serde(skip_serializing_if = "Option::is_none")]
23438    #[builder(default)]
23439    pub fill_opacity: Option<Opacity>,
23440    #[serde(skip_serializing_if = "Option::is_none")]
23441    #[builder(default)]
23442    pub font: Option<Box<Color>>,
23443    #[serde(skip_serializing_if = "Option::is_none")]
23444    #[builder(default)]
23445    pub font_size: Option<FontSize>,
23446    #[serde(skip_serializing_if = "Option::is_none")]
23447    #[builder(default)]
23448    pub font_style: Option<Box<Color>>,
23449    #[serde(skip_serializing_if = "Option::is_none")]
23450    #[builder(default)]
23451    pub font_weight: Option<FontWeightUnion>,
23452    #[serde(skip_serializing_if = "Option::is_none")]
23453    #[builder(default)]
23454    pub height: Option<CornerRadiusUnion>,
23455    #[serde(skip_serializing_if = "Option::is_none")]
23456    #[builder(default)]
23457    pub href: Option<Box<Color>>,
23458    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
23459    ///
23460    /// __Default value:__ `0`
23461    #[serde(skip_serializing_if = "Option::is_none")]
23462    #[builder(default)]
23463    pub inner_radius: Option<CornerRadiusUnion>,
23464    #[serde(skip_serializing_if = "Option::is_none")]
23465    #[builder(default)]
23466    pub interpolate: Option<MarkConfigInterpolate>,
23467    /// Invalid data mode, which defines how the marks and corresponding scales should represent
23468    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
23469    /// invalid values).
23470    ///
23471    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
23472    /// *scales*. For path marks (for line, area, trail), this option will create paths that
23473    /// connect valid points, as if the data rows with invalid values do not exist.
23474    ///
23475    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
23476    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
23477    /// *exclude* these filtered data points.
23478    ///
23479    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
23480    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
23481    /// data points (for both path and non-path marks).
23482    ///
23483    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
23484    /// will use the output for invalid values defined in `config.scale.invalid` or, if
23485    /// unspecified, by default invalid values will produce the same visual values as zero (if
23486    /// the scale includes zero) or the minimum value (if the scale does not include zero).
23487    ///
23488    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
23489    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
23490    /// non-path marks.
23491    ///
23492    /// __Note__: If any channel's scale has an output for invalid values defined in
23493    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
23494    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
23495    /// be filtered and will not cause path breaks.
23496    #[serde(skip_serializing_if = "Option::is_none")]
23497    #[builder(default)]
23498    pub invalid: Option<MarkInvalidDataMode>,
23499    #[serde(skip_serializing_if = "Option::is_none")]
23500    #[builder(default)]
23501    pub limit: Option<CornerRadiusUnion>,
23502    #[serde(skip_serializing_if = "Option::is_none")]
23503    #[builder(default)]
23504    pub line_break: Option<Box<Color>>,
23505    #[serde(skip_serializing_if = "Option::is_none")]
23506    #[builder(default)]
23507    pub line_height: Option<CornerRadiusUnion>,
23508    /// The minimum band size for bar and rectangle marks. __Default value:__ `0.25`
23509    #[serde(skip_serializing_if = "Option::is_none")]
23510    #[builder(default)]
23511    pub min_band_size: Option<CornerRadiusUnion>,
23512    /// The overall opacity (value between [0,1]).
23513    ///
23514    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
23515    /// `square` marks or layered `bar` charts and `1` otherwise.
23516    #[serde(skip_serializing_if = "Option::is_none")]
23517    #[builder(default)]
23518    pub opacity: Option<CornerRadiusUnion>,
23519    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
23520    /// the lines use the original order in the data sources.
23521    #[serde(skip_serializing_if = "Option::is_none")]
23522    #[builder(default)]
23523    pub order: Option<bool>,
23524    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
23525    /// horizontal (default) or vertical.
23526    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
23527    /// applied to x or y dimension.
23528    /// - For area, this property determines the orient property of the Vega output.
23529    /// - For line and trail marks, this property determines the sort order of the points in the
23530    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
23531    /// determined by the orientation of the stack; therefore explicitly specified value will be
23532    /// ignored.
23533    #[serde(skip_serializing_if = "Option::is_none")]
23534    #[builder(default)]
23535    pub orient: Option<Orientation>,
23536    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
23537    ///
23538    /// __Default value:__ `0`
23539    #[serde(skip_serializing_if = "Option::is_none")]
23540    #[builder(default)]
23541    pub outer_radius: Option<CornerRadiusUnion>,
23542    #[serde(skip_serializing_if = "Option::is_none")]
23543    #[builder(default)]
23544    pub pad_angle: Option<CornerRadiusUnion>,
23545    /// For arc mark, the primary (outer) radius in pixels.
23546    ///
23547    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
23548    /// determined by the `x` and `y` properties.
23549    ///
23550    /// __Default value:__ `min(plot_width, plot_height)/2`
23551    #[serde(skip_serializing_if = "Option::is_none")]
23552    #[builder(default)]
23553    pub radius: Option<CornerRadiusUnion>,
23554    /// The secondary (inner) radius in pixels of arc marks.
23555    ///
23556    /// __Default value:__ `0`
23557    #[serde(skip_serializing_if = "Option::is_none")]
23558    #[builder(default)]
23559    pub radius2: Option<CornerRadiusUnion>,
23560    #[serde(skip_serializing_if = "Option::is_none")]
23561    #[builder(default)]
23562    pub shape: Option<Box<Color>>,
23563    /// Default size for marks.
23564    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
23565    /// this value sets the area of the symbol; the side lengths will increase with the square
23566    /// root of this value.
23567    /// - For `bar`, this represents the band size of the bar, in pixels.
23568    /// - For `text`, this represents the font size, in pixels.
23569    ///
23570    /// __Default value:__
23571    /// - `30` for point, circle, square marks; width/height's `step`
23572    /// - `2` for bar marks with discrete dimensions;
23573    /// - `5` for bar marks with continuous dimensions;
23574    /// - `11` for text marks.
23575    #[serde(skip_serializing_if = "Option::is_none")]
23576    #[builder(default)]
23577    pub size: Option<CornerRadiusUnion>,
23578    #[serde(skip_serializing_if = "Option::is_none")]
23579    #[builder(default)]
23580    pub smooth: Option<Aria>,
23581    #[serde(skip_serializing_if = "Option::is_none")]
23582    #[builder(default)]
23583    pub start_angle: Option<CornerRadiusUnion>,
23584    /// Default stroke color. This property has higher precedence than `config.color`. Set to
23585    /// `null` to remove stroke.
23586    ///
23587    /// __Default value:__ (None)
23588    #[serde(skip_serializing_if = "Option::is_none")]
23589    #[builder(default)]
23590    pub stroke: Option<MarkConfigFill>,
23591    #[serde(skip_serializing_if = "Option::is_none")]
23592    #[builder(default)]
23593    pub stroke_cap: Option<Cap>,
23594    #[serde(skip_serializing_if = "Option::is_none")]
23595    #[builder(default)]
23596    pub stroke_dash: Option<StrokeDashUnion>,
23597    #[serde(skip_serializing_if = "Option::is_none")]
23598    #[builder(default)]
23599    pub stroke_dash_offset: Option<CornerRadiusUnion>,
23600    #[serde(skip_serializing_if = "Option::is_none")]
23601    #[builder(default)]
23602    pub stroke_join: Option<StrokeJoinUnion>,
23603    #[serde(skip_serializing_if = "Option::is_none")]
23604    #[builder(default)]
23605    pub stroke_miter_limit: Option<CornerRadiusUnion>,
23606    #[serde(skip_serializing_if = "Option::is_none")]
23607    #[builder(default)]
23608    pub stroke_offset: Option<CornerRadiusUnion>,
23609    #[serde(skip_serializing_if = "Option::is_none")]
23610    #[builder(default)]
23611    pub stroke_opacity: Option<Opacity>,
23612    #[serde(skip_serializing_if = "Option::is_none")]
23613    #[builder(default)]
23614    pub stroke_width: Option<FontSize>,
23615    #[serde(skip_serializing_if = "Option::is_none")]
23616    #[builder(default)]
23617    pub tension: Option<CornerRadiusUnion>,
23618    #[serde(skip_serializing_if = "Option::is_none")]
23619    #[builder(default)]
23620    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
23621    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
23622    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
23623    /// clockwise.)
23624    ///
23625    /// - For text marks, polar coordinate angle in radians.
23626    #[serde(skip_serializing_if = "Option::is_none")]
23627    #[builder(default)]
23628    pub theta: Option<CornerRadiusUnion>,
23629    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
23630    /// values proceed clockwise.
23631    #[serde(skip_serializing_if = "Option::is_none")]
23632    #[builder(default)]
23633    pub theta2: Option<CornerRadiusUnion>,
23634    #[serde(skip_serializing_if = "Option::is_none")]
23635    #[builder(default)]
23636    pub time: Option<CornerRadiusUnion>,
23637    /// Default relative band position for a time unit. If set to `0`, the marks will be
23638    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
23639    /// be positioned in the middle of the time unit band step.
23640    #[serde(skip_serializing_if = "Option::is_none")]
23641    #[builder(default)]
23642    pub time_unit_band_position: Option<f64>,
23643    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
23644    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
23645    /// half of the time unit band step.
23646    #[serde(skip_serializing_if = "Option::is_none")]
23647    #[builder(default)]
23648    pub time_unit_band_size: Option<f64>,
23649    /// The tooltip text string to show upon mouse hover or an object defining which fields
23650    /// should the tooltip be derived from.
23651    ///
23652    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
23653    /// will be used.
23654    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
23655    /// data point will be used.
23656    /// - If set to `null` or `false`, then no tooltip will be used.
23657    ///
23658    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
23659    /// a detailed discussion about tooltip  in Vega-Lite.
23660    ///
23661    /// __Default value:__ `null`
23662    #[serde(skip_serializing_if = "Option::is_none")]
23663    #[builder(default)]
23664    pub tooltip: Option<OverlayMarkDefTooltip>,
23665    #[serde(skip_serializing_if = "Option::is_none")]
23666    #[builder(default)]
23667    pub url: Option<Box<Color>>,
23668    #[serde(skip_serializing_if = "Option::is_none")]
23669    #[builder(default)]
23670    pub width: Option<CornerRadiusUnion>,
23671    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
23672    /// `x2` or `width`.
23673    ///
23674    /// The `value` of this channel can be a number or a string `"width"` for the width of the
23675    /// plot.
23676    #[serde(skip_serializing_if = "Option::is_none")]
23677    #[builder(default)]
23678    pub x: Option<XUnion>,
23679    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
23680    ///
23681    /// The `value` of this channel can be a number or a string `"width"` for the width of the
23682    /// plot.
23683    #[serde(skip_serializing_if = "Option::is_none")]
23684    #[builder(default)]
23685    pub x2: Option<XUnion>,
23686    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
23687    /// `y2` or `height`.
23688    ///
23689    /// The `value` of this channel can be a number or a string `"height"` for the height of the
23690    /// plot.
23691    #[serde(skip_serializing_if = "Option::is_none")]
23692    #[builder(default)]
23693    pub y: Option<YUnion>,
23694    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
23695    ///
23696    /// The `value` of this channel can be a number or a string `"height"` for the height of the
23697    /// plot.
23698    #[serde(skip_serializing_if = "Option::is_none")]
23699    #[builder(default)]
23700    pub y2: Option<YUnion>,
23701}
23702
23703/// Area-Specific Config
23704#[derive(Debug, Clone, Serialize, Deserialize)]
23705#[serde(rename_all = "camelCase")]
23706#[derive(Default, Builder)]
23707#[builder(setter(into, strip_option))]
23708pub struct AreaConfig {
23709    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
23710    /// of `"left"`, `"right"`, `"center"`.
23711    ///
23712    /// __Note:__ Expression reference is *not* supported for range marks.
23713    #[serde(skip_serializing_if = "Option::is_none")]
23714    #[builder(default)]
23715    pub align: Option<TitleAlignUnion>,
23716    #[serde(skip_serializing_if = "Option::is_none")]
23717    #[builder(default)]
23718    pub angle: Option<Angle>,
23719    #[serde(skip_serializing_if = "Option::is_none")]
23720    #[builder(default)]
23721    pub aria: Option<Aria>,
23722    #[serde(skip_serializing_if = "Option::is_none")]
23723    #[builder(default)]
23724    pub aria_role: Option<Box<Color>>,
23725    #[serde(skip_serializing_if = "Option::is_none")]
23726    #[builder(default)]
23727    pub aria_role_description: Option<Box<Color>>,
23728    #[serde(skip_serializing_if = "Option::is_none")]
23729    #[builder(default)]
23730    pub aspect: Option<Aria>,
23731    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
23732    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
23733    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
23734    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
23735    /// rather than `fontSize` alone.
23736    ///
23737    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
23738    /// `"bottom"`.
23739    ///
23740    /// __Note:__ Expression reference is *not* supported for range marks.
23741    #[serde(skip_serializing_if = "Option::is_none")]
23742    #[builder(default)]
23743    pub baseline: Option<TextBaseline>,
23744    #[serde(skip_serializing_if = "Option::is_none")]
23745    #[builder(default)]
23746    pub blend: Option<BlendUnion>,
23747    /// Default color.
23748    ///
23749    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
23750    ///
23751    /// __Note:__
23752    /// - This property cannot be used in a [style
23753    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
23754    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
23755    /// override `color`.
23756    #[serde(skip_serializing_if = "Option::is_none")]
23757    #[builder(default)]
23758    pub color: Option<MarkConfigColor>,
23759    #[serde(skip_serializing_if = "Option::is_none")]
23760    #[builder(default)]
23761    pub corner_radius: Option<CornerRadiusUnion>,
23762    #[serde(skip_serializing_if = "Option::is_none")]
23763    #[builder(default)]
23764    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
23765    #[serde(skip_serializing_if = "Option::is_none")]
23766    #[builder(default)]
23767    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
23768    #[serde(skip_serializing_if = "Option::is_none")]
23769    #[builder(default)]
23770    pub corner_radius_top_left: Option<CornerRadiusUnion>,
23771    #[serde(skip_serializing_if = "Option::is_none")]
23772    #[builder(default)]
23773    pub corner_radius_top_right: Option<CornerRadiusUnion>,
23774    #[serde(skip_serializing_if = "Option::is_none")]
23775    #[builder(default)]
23776    pub cursor: Option<CursorUnion>,
23777    #[serde(skip_serializing_if = "Option::is_none")]
23778    #[builder(default)]
23779    pub description: Option<Box<Color>>,
23780    #[serde(skip_serializing_if = "Option::is_none")]
23781    #[builder(default)]
23782    pub dir: Option<Dir>,
23783    #[serde(skip_serializing_if = "Option::is_none")]
23784    #[builder(default)]
23785    pub dx: Option<CornerRadiusUnion>,
23786    #[serde(skip_serializing_if = "Option::is_none")]
23787    #[builder(default)]
23788    pub dy: Option<CornerRadiusUnion>,
23789    #[serde(skip_serializing_if = "Option::is_none")]
23790    #[builder(default)]
23791    pub ellipsis: Option<Box<Color>>,
23792    #[serde(skip_serializing_if = "Option::is_none")]
23793    #[builder(default)]
23794    pub end_angle: Option<CornerRadiusUnion>,
23795    /// Default fill color. This property has higher precedence than `config.color`. Set to
23796    /// `null` to remove fill.
23797    ///
23798    /// __Default value:__ (None)
23799    #[serde(skip_serializing_if = "Option::is_none")]
23800    #[builder(default)]
23801    pub fill: Option<MarkConfigFill>,
23802    /// Whether the mark's color should be used as fill color instead of stroke color.
23803    ///
23804    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
23805    /// `geoshape` marks for
23806    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
23807    /// otherwise, `true`.
23808    ///
23809    /// __Note:__ This property cannot be used in a [style
23810    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
23811    #[serde(skip_serializing_if = "Option::is_none")]
23812    #[builder(default)]
23813    pub filled: Option<bool>,
23814    #[serde(skip_serializing_if = "Option::is_none")]
23815    #[builder(default)]
23816    pub fill_opacity: Option<Opacity>,
23817    #[serde(skip_serializing_if = "Option::is_none")]
23818    #[builder(default)]
23819    pub font: Option<Box<Color>>,
23820    #[serde(skip_serializing_if = "Option::is_none")]
23821    #[builder(default)]
23822    pub font_size: Option<FontSize>,
23823    #[serde(skip_serializing_if = "Option::is_none")]
23824    #[builder(default)]
23825    pub font_style: Option<Box<Color>>,
23826    #[serde(skip_serializing_if = "Option::is_none")]
23827    #[builder(default)]
23828    pub font_weight: Option<FontWeightUnion>,
23829    #[serde(skip_serializing_if = "Option::is_none")]
23830    #[builder(default)]
23831    pub height: Option<CornerRadiusUnion>,
23832    #[serde(skip_serializing_if = "Option::is_none")]
23833    #[builder(default)]
23834    pub href: Option<Box<Color>>,
23835    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
23836    ///
23837    /// __Default value:__ `0`
23838    #[serde(skip_serializing_if = "Option::is_none")]
23839    #[builder(default)]
23840    pub inner_radius: Option<CornerRadiusUnion>,
23841    #[serde(skip_serializing_if = "Option::is_none")]
23842    #[builder(default)]
23843    pub interpolate: Option<MarkConfigInterpolate>,
23844    /// Invalid data mode, which defines how the marks and corresponding scales should represent
23845    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
23846    /// invalid values).
23847    ///
23848    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
23849    /// *scales*. For path marks (for line, area, trail), this option will create paths that
23850    /// connect valid points, as if the data rows with invalid values do not exist.
23851    ///
23852    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
23853    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
23854    /// *exclude* these filtered data points.
23855    ///
23856    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
23857    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
23858    /// data points (for both path and non-path marks).
23859    ///
23860    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
23861    /// will use the output for invalid values defined in `config.scale.invalid` or, if
23862    /// unspecified, by default invalid values will produce the same visual values as zero (if
23863    /// the scale includes zero) or the minimum value (if the scale does not include zero).
23864    ///
23865    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
23866    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
23867    /// non-path marks.
23868    ///
23869    /// __Note__: If any channel's scale has an output for invalid values defined in
23870    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
23871    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
23872    /// be filtered and will not cause path breaks.
23873    #[serde(skip_serializing_if = "Option::is_none")]
23874    #[builder(default)]
23875    pub invalid: Option<MarkInvalidDataMode>,
23876    #[serde(skip_serializing_if = "Option::is_none")]
23877    #[builder(default)]
23878    pub limit: Option<CornerRadiusUnion>,
23879    /// A flag for overlaying line on top of area marks, or an object defining the properties of
23880    /// the overlayed lines.
23881    ///
23882    /// - If this value is an empty object (`{}`) or `true`, lines with default properties will
23883    /// be used.
23884    ///
23885    /// - If this value is `false`, no lines would be automatically added to area marks.
23886    ///
23887    /// __Default value:__ `false`.
23888    #[serde(skip_serializing_if = "Option::is_none")]
23889    #[builder(default)]
23890    pub line: Option<Line>,
23891    #[serde(skip_serializing_if = "Option::is_none")]
23892    #[builder(default)]
23893    pub line_break: Option<Box<Color>>,
23894    #[serde(skip_serializing_if = "Option::is_none")]
23895    #[builder(default)]
23896    pub line_height: Option<CornerRadiusUnion>,
23897    /// The overall opacity (value between [0,1]).
23898    ///
23899    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
23900    /// `square` marks or layered `bar` charts and `1` otherwise.
23901    #[serde(skip_serializing_if = "Option::is_none")]
23902    #[builder(default)]
23903    pub opacity: Option<CornerRadiusUnion>,
23904    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
23905    /// the lines use the original order in the data sources.
23906    #[serde(skip_serializing_if = "Option::is_none")]
23907    #[builder(default)]
23908    pub order: Option<bool>,
23909    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
23910    /// horizontal (default) or vertical.
23911    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
23912    /// applied to x or y dimension.
23913    /// - For area, this property determines the orient property of the Vega output.
23914    /// - For line and trail marks, this property determines the sort order of the points in the
23915    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
23916    /// determined by the orientation of the stack; therefore explicitly specified value will be
23917    /// ignored.
23918    #[serde(skip_serializing_if = "Option::is_none")]
23919    #[builder(default)]
23920    pub orient: Option<Orientation>,
23921    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
23922    ///
23923    /// __Default value:__ `0`
23924    #[serde(skip_serializing_if = "Option::is_none")]
23925    #[builder(default)]
23926    pub outer_radius: Option<CornerRadiusUnion>,
23927    #[serde(skip_serializing_if = "Option::is_none")]
23928    #[builder(default)]
23929    pub pad_angle: Option<CornerRadiusUnion>,
23930    /// A flag for overlaying points on top of line or area marks, or an object defining the
23931    /// properties of the overlayed points.
23932    ///
23933    /// - If this property is `"transparent"`, transparent points will be used (for enhancing
23934    /// tooltips and selections).
23935    ///
23936    /// - If this property is an empty object (`{}`) or `true`, filled points with default
23937    /// properties will be used.
23938    ///
23939    /// - If this property is `false`, no points would be automatically added to line or area
23940    /// marks.
23941    ///
23942    /// __Default value:__ `false`.
23943    #[serde(skip_serializing_if = "Option::is_none")]
23944    #[builder(default)]
23945    pub point: Option<PointUnion>,
23946    /// For arc mark, the primary (outer) radius in pixels.
23947    ///
23948    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
23949    /// determined by the `x` and `y` properties.
23950    ///
23951    /// __Default value:__ `min(plot_width, plot_height)/2`
23952    #[serde(skip_serializing_if = "Option::is_none")]
23953    #[builder(default)]
23954    pub radius: Option<CornerRadiusUnion>,
23955    /// The secondary (inner) radius in pixels of arc marks.
23956    ///
23957    /// __Default value:__ `0`
23958    #[serde(skip_serializing_if = "Option::is_none")]
23959    #[builder(default)]
23960    pub radius2: Option<CornerRadiusUnion>,
23961    #[serde(skip_serializing_if = "Option::is_none")]
23962    #[builder(default)]
23963    pub shape: Option<Box<Color>>,
23964    /// Default size for marks.
23965    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
23966    /// this value sets the area of the symbol; the side lengths will increase with the square
23967    /// root of this value.
23968    /// - For `bar`, this represents the band size of the bar, in pixels.
23969    /// - For `text`, this represents the font size, in pixels.
23970    ///
23971    /// __Default value:__
23972    /// - `30` for point, circle, square marks; width/height's `step`
23973    /// - `2` for bar marks with discrete dimensions;
23974    /// - `5` for bar marks with continuous dimensions;
23975    /// - `11` for text marks.
23976    #[serde(skip_serializing_if = "Option::is_none")]
23977    #[builder(default)]
23978    pub size: Option<CornerRadiusUnion>,
23979    #[serde(skip_serializing_if = "Option::is_none")]
23980    #[builder(default)]
23981    pub smooth: Option<Aria>,
23982    #[serde(skip_serializing_if = "Option::is_none")]
23983    #[builder(default)]
23984    pub start_angle: Option<CornerRadiusUnion>,
23985    /// Default stroke color. This property has higher precedence than `config.color`. Set to
23986    /// `null` to remove stroke.
23987    ///
23988    /// __Default value:__ (None)
23989    #[serde(skip_serializing_if = "Option::is_none")]
23990    #[builder(default)]
23991    pub stroke: Option<MarkConfigFill>,
23992    #[serde(skip_serializing_if = "Option::is_none")]
23993    #[builder(default)]
23994    pub stroke_cap: Option<Cap>,
23995    #[serde(skip_serializing_if = "Option::is_none")]
23996    #[builder(default)]
23997    pub stroke_dash: Option<StrokeDashUnion>,
23998    #[serde(skip_serializing_if = "Option::is_none")]
23999    #[builder(default)]
24000    pub stroke_dash_offset: Option<CornerRadiusUnion>,
24001    #[serde(skip_serializing_if = "Option::is_none")]
24002    #[builder(default)]
24003    pub stroke_join: Option<StrokeJoinUnion>,
24004    #[serde(skip_serializing_if = "Option::is_none")]
24005    #[builder(default)]
24006    pub stroke_miter_limit: Option<CornerRadiusUnion>,
24007    #[serde(skip_serializing_if = "Option::is_none")]
24008    #[builder(default)]
24009    pub stroke_offset: Option<CornerRadiusUnion>,
24010    #[serde(skip_serializing_if = "Option::is_none")]
24011    #[builder(default)]
24012    pub stroke_opacity: Option<Opacity>,
24013    #[serde(skip_serializing_if = "Option::is_none")]
24014    #[builder(default)]
24015    pub stroke_width: Option<FontSize>,
24016    #[serde(skip_serializing_if = "Option::is_none")]
24017    #[builder(default)]
24018    pub tension: Option<CornerRadiusUnion>,
24019    #[serde(skip_serializing_if = "Option::is_none")]
24020    #[builder(default)]
24021    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
24022    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
24023    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
24024    /// clockwise.)
24025    ///
24026    /// - For text marks, polar coordinate angle in radians.
24027    #[serde(skip_serializing_if = "Option::is_none")]
24028    #[builder(default)]
24029    pub theta: Option<CornerRadiusUnion>,
24030    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
24031    /// values proceed clockwise.
24032    #[serde(skip_serializing_if = "Option::is_none")]
24033    #[builder(default)]
24034    pub theta2: Option<CornerRadiusUnion>,
24035    #[serde(skip_serializing_if = "Option::is_none")]
24036    #[builder(default)]
24037    pub time: Option<CornerRadiusUnion>,
24038    /// Default relative band position for a time unit. If set to `0`, the marks will be
24039    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
24040    /// be positioned in the middle of the time unit band step.
24041    #[serde(skip_serializing_if = "Option::is_none")]
24042    #[builder(default)]
24043    pub time_unit_band_position: Option<f64>,
24044    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
24045    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
24046    /// half of the time unit band step.
24047    #[serde(skip_serializing_if = "Option::is_none")]
24048    #[builder(default)]
24049    pub time_unit_band_size: Option<f64>,
24050    /// The tooltip text string to show upon mouse hover or an object defining which fields
24051    /// should the tooltip be derived from.
24052    ///
24053    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
24054    /// will be used.
24055    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
24056    /// data point will be used.
24057    /// - If set to `null` or `false`, then no tooltip will be used.
24058    ///
24059    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
24060    /// a detailed discussion about tooltip  in Vega-Lite.
24061    ///
24062    /// __Default value:__ `null`
24063    #[serde(skip_serializing_if = "Option::is_none")]
24064    #[builder(default)]
24065    pub tooltip: Option<OverlayMarkDefTooltip>,
24066    #[serde(skip_serializing_if = "Option::is_none")]
24067    #[builder(default)]
24068    pub url: Option<Box<Color>>,
24069    #[serde(skip_serializing_if = "Option::is_none")]
24070    #[builder(default)]
24071    pub width: Option<CornerRadiusUnion>,
24072    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
24073    /// `x2` or `width`.
24074    ///
24075    /// The `value` of this channel can be a number or a string `"width"` for the width of the
24076    /// plot.
24077    #[serde(skip_serializing_if = "Option::is_none")]
24078    #[builder(default)]
24079    pub x: Option<XUnion>,
24080    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
24081    ///
24082    /// The `value` of this channel can be a number or a string `"width"` for the width of the
24083    /// plot.
24084    #[serde(skip_serializing_if = "Option::is_none")]
24085    #[builder(default)]
24086    pub x2: Option<XUnion>,
24087    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
24088    /// `y2` or `height`.
24089    ///
24090    /// The `value` of this channel can be a number or a string `"height"` for the height of the
24091    /// plot.
24092    #[serde(skip_serializing_if = "Option::is_none")]
24093    #[builder(default)]
24094    pub y: Option<YUnion>,
24095    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
24096    ///
24097    /// The `value` of this channel can be a number or a string `"height"` for the height of the
24098    /// plot.
24099    #[serde(skip_serializing_if = "Option::is_none")]
24100    #[builder(default)]
24101    pub y2: Option<YUnion>,
24102}
24103
24104/// Axis configuration, which determines default properties for all `x` and `y`
24105/// [axes](https://vega.github.io/vega-lite/docs/axis.html). For a full list of axis
24106/// configuration options, please see the [corresponding section of the axis
24107/// documentation](https://vega.github.io/vega-lite/docs/axis.html#config).
24108///
24109/// Config for axes with "band" scales.
24110///
24111/// Config for x-axis along the bottom edge of the chart.
24112///
24113/// Config for axes with "point" or "band" scales.
24114///
24115/// Config for y-axis along the left edge of the chart.
24116///
24117/// Config for axes with "point" scales.
24118///
24119/// Config for quantitative axes.
24120///
24121/// Config for y-axis along the right edge of the chart.
24122///
24123/// Config for temporal axes.
24124///
24125/// Config for x-axis along the top edge of the chart.
24126///
24127/// X-axis specific config.
24128///
24129/// Config for x-axes with "band" scales.
24130///
24131/// Config for x-axes with "point" or "band" scales.
24132///
24133/// Config for x-axes with "point" scales.
24134///
24135/// Config for x-quantitative axes.
24136///
24137/// Config for x-temporal axes.
24138///
24139/// Y-axis specific config.
24140///
24141/// Config for y-axes with "band" scales.
24142///
24143/// Config for y-axes with "point" or "band" scales.
24144///
24145/// Config for y-axes with "point" scales.
24146///
24147/// Config for y-quantitative axes.
24148///
24149/// Config for y-temporal axes.
24150#[derive(Debug, Clone, Serialize, Deserialize)]
24151#[serde(rename_all = "camelCase")]
24152#[derive(Default, Builder)]
24153#[builder(setter(into, strip_option))]
24154pub struct AxisConfig {
24155    #[serde(skip_serializing_if = "Option::is_none")]
24156    #[builder(default)]
24157    pub aria: Option<Aria>,
24158    #[serde(skip_serializing_if = "Option::is_none")]
24159    #[builder(default)]
24160    pub band_position: Option<CornerRadiusUnion>,
24161    #[serde(skip_serializing_if = "Option::is_none")]
24162    #[builder(default)]
24163    pub description: Option<Box<Color>>,
24164    /// Disable axis by default.
24165    #[serde(skip_serializing_if = "Option::is_none")]
24166    #[builder(default)]
24167    pub disable: Option<bool>,
24168    /// A boolean flag indicating if the domain (the axis baseline) should be included as part of
24169    /// the axis.
24170    ///
24171    /// __Default value:__ `true`
24172    #[serde(skip_serializing_if = "Option::is_none")]
24173    #[builder(default)]
24174    pub domain: Option<bool>,
24175    #[serde(skip_serializing_if = "Option::is_none")]
24176    #[builder(default)]
24177    pub domain_cap: Option<Cap>,
24178    #[serde(skip_serializing_if = "Option::is_none")]
24179    #[builder(default)]
24180    pub domain_color: Option<Box<Color>>,
24181    #[serde(skip_serializing_if = "Option::is_none")]
24182    #[builder(default)]
24183    pub domain_dash: Option<StrokeDashUnion>,
24184    #[serde(skip_serializing_if = "Option::is_none")]
24185    #[builder(default)]
24186    pub domain_dash_offset: Option<CornerRadiusUnion>,
24187    #[serde(skip_serializing_if = "Option::is_none")]
24188    #[builder(default)]
24189    pub domain_opacity: Option<CornerRadiusUnion>,
24190    #[serde(skip_serializing_if = "Option::is_none")]
24191    #[builder(default)]
24192    pub domain_width: Option<CornerRadiusUnion>,
24193    /// When used with the default `"number"` and `"time"` format type, the text formatting
24194    /// pattern for labels of guides (axes, legends, headers) and text marks.
24195    ///
24196    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
24197    /// format pattern](https://github.com/d3/d3-format#locale_format).
24198    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
24199    /// pattern](https://github.com/d3/d3-time-format#locale_format).
24200    ///
24201    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
24202    /// more examples.
24203    ///
24204    /// When used with a [custom
24205    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
24206    /// value will be passed as `format` alongside `datum.value` to the registered function.
24207    ///
24208    /// __Default value:__  Derived from
24209    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
24210    /// number format and from
24211    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
24212    /// format.
24213    #[serde(skip_serializing_if = "Option::is_none")]
24214    #[builder(default)]
24215    pub format: Option<Format>,
24216    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
24217    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
24218    ///
24219    /// __Default value:__
24220    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
24221    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
24222    /// `timeUnit`.
24223    #[serde(skip_serializing_if = "Option::is_none")]
24224    #[builder(default)]
24225    pub format_type: Option<String>,
24226    /// A boolean flag indicating if grid lines should be included as part of the axis
24227    ///
24228    /// __Default value:__ `true` for [continuous
24229    /// scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned;
24230    /// otherwise, `false`.
24231    #[serde(skip_serializing_if = "Option::is_none")]
24232    #[builder(default)]
24233    pub grid: Option<bool>,
24234    #[serde(skip_serializing_if = "Option::is_none")]
24235    #[builder(default)]
24236    pub grid_cap: Option<Cap>,
24237    #[serde(skip_serializing_if = "Option::is_none")]
24238    #[builder(default)]
24239    pub grid_color: Option<GridColorUnion>,
24240    #[serde(skip_serializing_if = "Option::is_none")]
24241    #[builder(default)]
24242    pub grid_dash: Option<AxisBandGridDash>,
24243    #[serde(skip_serializing_if = "Option::is_none")]
24244    #[builder(default)]
24245    pub grid_dash_offset: Option<GridDashOffsetUnion>,
24246    #[serde(skip_serializing_if = "Option::is_none")]
24247    #[builder(default)]
24248    pub grid_opacity: Option<GridOpacityUnion>,
24249    #[serde(skip_serializing_if = "Option::is_none")]
24250    #[builder(default)]
24251    pub grid_width: Option<GridWidthUnion>,
24252    #[serde(skip_serializing_if = "Option::is_none")]
24253    #[builder(default)]
24254    pub label_align: Option<ConditionalAxisPropertyAlignNull>,
24255    #[serde(skip_serializing_if = "Option::is_none")]
24256    #[builder(default)]
24257    pub label_angle: Option<LabelAngle>,
24258    #[serde(skip_serializing_if = "Option::is_none")]
24259    #[builder(default)]
24260    pub label_baseline: Option<PurpleTextBaseline>,
24261    #[serde(skip_serializing_if = "Option::is_none")]
24262    #[builder(default)]
24263    pub label_bound: Option<Label>,
24264    #[serde(skip_serializing_if = "Option::is_none")]
24265    #[builder(default)]
24266    pub label_color: Option<GridColorUnion>,
24267    /// [Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.
24268    ///
24269    /// __Note:__ The label text and value can be assessed via the `label` and `value` properties
24270    /// of the axis's backing `datum` object.
24271    #[serde(skip_serializing_if = "Option::is_none")]
24272    #[builder(default)]
24273    pub label_expr: Option<String>,
24274    /// Indicates if the first and last axis labels should be aligned flush with the scale range.
24275    /// Flush alignment for a horizontal axis will left-align the first label and right-align the
24276    /// last label. For vertical axes, bottom and top text baselines are applied instead. If this
24277    /// property is a number, it also indicates the number of pixels by which to offset the first
24278    /// and last labels; for example, a value of 2 will flush-align the first and last labels and
24279    /// also push them 2 pixels outward from the center of the axis. The additional adjustment
24280    /// can sometimes help the labels better visually group with corresponding axis ticks.
24281    ///
24282    /// __Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.
24283    #[serde(skip_serializing_if = "Option::is_none")]
24284    #[builder(default)]
24285    pub label_flush: Option<LabelFlush>,
24286    #[serde(skip_serializing_if = "Option::is_none")]
24287    #[builder(default)]
24288    pub label_flush_offset: Option<CornerRadiusUnion>,
24289    #[serde(skip_serializing_if = "Option::is_none")]
24290    #[builder(default)]
24291    pub label_font: Option<ConditionalAxisPropertyStringNull>,
24292    #[serde(skip_serializing_if = "Option::is_none")]
24293    #[builder(default)]
24294    pub label_font_size: Option<GridWidthUnion>,
24295    #[serde(skip_serializing_if = "Option::is_none")]
24296    #[builder(default)]
24297    pub label_font_style: Option<ConditionalAxisPropertyFontStyleNull>,
24298    #[serde(skip_serializing_if = "Option::is_none")]
24299    #[builder(default)]
24300    pub label_font_weight: Option<FontWeight>,
24301    #[serde(skip_serializing_if = "Option::is_none")]
24302    #[builder(default)]
24303    pub label_limit: Option<CornerRadiusUnion>,
24304    #[serde(skip_serializing_if = "Option::is_none")]
24305    #[builder(default)]
24306    pub label_line_height: Option<CornerRadiusUnion>,
24307    #[serde(skip_serializing_if = "Option::is_none")]
24308    #[builder(default)]
24309    pub label_offset: Option<GridDashOffsetUnion>,
24310    #[serde(skip_serializing_if = "Option::is_none")]
24311    #[builder(default)]
24312    pub label_opacity: Option<GridDashOffsetUnion>,
24313    /// The strategy to use for resolving overlap of axis labels. If `false` (the default), no
24314    /// overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
24315    /// every other label is used (this works well for standard linear axes). If set to
24316    /// `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps
24317    /// with the last visible label (this often works better for log-scaled axes).
24318    ///
24319    /// __Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log
24320    /// scales; otherwise `false`.
24321    #[serde(skip_serializing_if = "Option::is_none")]
24322    #[builder(default)]
24323    pub label_overlap: Option<LabelOverlapUnion>,
24324    #[serde(skip_serializing_if = "Option::is_none")]
24325    #[builder(default)]
24326    pub label_padding: Option<GridDashOffsetUnion>,
24327    /// A boolean flag indicating if labels should be included as part of the axis.
24328    ///
24329    /// __Default value:__ `true`.
24330    #[serde(skip_serializing_if = "Option::is_none")]
24331    #[builder(default)]
24332    pub labels: Option<bool>,
24333    #[serde(skip_serializing_if = "Option::is_none")]
24334    #[builder(default)]
24335    pub label_separation: Option<CornerRadiusUnion>,
24336    #[serde(skip_serializing_if = "Option::is_none")]
24337    #[builder(default)]
24338    pub max_extent: Option<CornerRadiusUnion>,
24339    #[serde(skip_serializing_if = "Option::is_none")]
24340    #[builder(default)]
24341    pub min_extent: Option<CornerRadiusUnion>,
24342    /// The offset, in pixels, by which to displace the axis from the edge of the enclosing group
24343    /// or data rectangle.
24344    ///
24345    /// __Default value:__ derived from the [axis
24346    /// config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset`
24347    /// (`0` by default)
24348    #[serde(skip_serializing_if = "Option::is_none")]
24349    #[builder(default)]
24350    pub offset: Option<CornerRadiusUnion>,
24351    /// The orientation of the axis. One of `"top"`, `"bottom"`, `"left"` or `"right"`. The
24352    /// orientation can be used to further specialize the axis type (e.g., a y-axis oriented
24353    /// towards the right edge of the chart).
24354    ///
24355    /// __Default value:__ `"bottom"` for x-axes and `"left"` for y-axes.
24356    #[serde(skip_serializing_if = "Option::is_none")]
24357    #[builder(default)]
24358    pub orient: Option<TitleOrientUnion>,
24359    /// The anchor position of the axis in pixels. For x-axes with top or bottom orientation,
24360    /// this sets the axis group x coordinate. For y-axes with left or right orientation, this
24361    /// sets the axis group y coordinate.
24362    ///
24363    /// __Default value__: `0`
24364    #[serde(skip_serializing_if = "Option::is_none")]
24365    #[builder(default)]
24366    pub position: Option<CornerRadiusUnion>,
24367    /// A string or array of strings indicating the name of custom styles to apply to the axis. A
24368    /// style is a named collection of axis property defined within the [style
24369    /// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
24370    /// an array, later styles will override earlier styles.
24371    ///
24372    /// __Default value:__ (none) __Note:__ Any specified style will augment the default style.
24373    /// For example, an x-axis mark with `"style": "foo"` will use `config.axisX` and
24374    /// `config.style.foo` (the specified style `"foo"` has higher precedence).
24375    #[serde(skip_serializing_if = "Option::is_none")]
24376    #[builder(default)]
24377    pub style: Option<LegendText>,
24378    #[serde(skip_serializing_if = "Option::is_none")]
24379    #[builder(default)]
24380    pub tick_band: Option<TickBandUnion>,
24381    #[serde(skip_serializing_if = "Option::is_none")]
24382    #[builder(default)]
24383    pub tick_cap: Option<Cap>,
24384    #[serde(skip_serializing_if = "Option::is_none")]
24385    #[builder(default)]
24386    pub tick_color: Option<GridColorUnion>,
24387    /// A desired number of ticks, for axes visualizing quantitative scales. The resulting number
24388    /// may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the
24389    /// underlying scale's range.
24390    ///
24391    /// For scales of type `"time"` or `"utc"`, the tick count can instead be a time interval
24392    /// specifier. Legal string values are `"millisecond"`, `"second"`, `"minute"`, `"hour"`,
24393    /// `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, an object-valued interval
24394    /// specifier of the form `{"interval": "month", "step": 3}` includes a desired number of
24395    /// interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct)
24396    /// boundary.
24397    ///
24398    /// __Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)`
24399    /// for y.
24400    #[serde(skip_serializing_if = "Option::is_none")]
24401    #[builder(default)]
24402    pub tick_count: Option<TickCount>,
24403    #[serde(skip_serializing_if = "Option::is_none")]
24404    #[builder(default)]
24405    pub tick_dash: Option<AxisBandTickDash>,
24406    #[serde(skip_serializing_if = "Option::is_none")]
24407    #[builder(default)]
24408    pub tick_dash_offset: Option<GridDashOffsetUnion>,
24409    /// Boolean flag indicating if an extra axis tick should be added for the initial position of
24410    /// the axis. This flag is useful for styling axes for `band` scales such that ticks are
24411    /// placed on band boundaries rather in the middle of a band. Use in conjunction with
24412    /// `"bandPosition": 1` and an axis `"padding"` value of `0`.
24413    #[serde(skip_serializing_if = "Option::is_none")]
24414    #[builder(default)]
24415    pub tick_extra: Option<bool>,
24416    /// The minimum desired step between axis ticks, in terms of scale domain values. For
24417    /// example, a value of `1` indicates that ticks should not be less than 1 unit apart. If
24418    /// `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to
24419    /// enforce the minimum step value.
24420    #[serde(skip_serializing_if = "Option::is_none")]
24421    #[builder(default)]
24422    pub tick_min_step: Option<CornerRadiusUnion>,
24423    #[serde(skip_serializing_if = "Option::is_none")]
24424    #[builder(default)]
24425    pub tick_offset: Option<CornerRadiusUnion>,
24426    #[serde(skip_serializing_if = "Option::is_none")]
24427    #[builder(default)]
24428    pub tick_opacity: Option<GridDashOffsetUnion>,
24429    /// Boolean flag indicating if pixel position values should be rounded to the nearest
24430    /// integer.
24431    ///
24432    /// __Default value:__ `true`
24433    #[serde(skip_serializing_if = "Option::is_none")]
24434    #[builder(default)]
24435    pub tick_round: Option<bool>,
24436    /// Boolean value that determines whether the axis should include ticks.
24437    ///
24438    /// __Default value:__ `true`
24439    #[serde(skip_serializing_if = "Option::is_none")]
24440    #[builder(default)]
24441    pub ticks: Option<bool>,
24442    #[serde(skip_serializing_if = "Option::is_none")]
24443    #[builder(default)]
24444    pub tick_size: Option<GridWidthUnion>,
24445    #[serde(skip_serializing_if = "Option::is_none")]
24446    #[builder(default)]
24447    pub tick_width: Option<GridWidthUnion>,
24448    /// A title for the field. If `null`, the title will be removed.
24449    ///
24450    /// __Default value:__  derived from the field's name and transformation function
24451    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
24452    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
24453    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
24454    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
24455    /// name.
24456    ///
24457    /// __Notes__:
24458    ///
24459    /// 1) You can customize the default field title format by providing the
24460    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
24461    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
24462    /// [`fieldTitle` function via the `compile` function's
24463    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
24464    ///
24465    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
24466    /// axis/header/legend title will be used.
24467    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
24468    #[builder(default)]
24469    pub title: RemovableValue<LegendText>,
24470    #[serde(skip_serializing_if = "Option::is_none")]
24471    #[builder(default)]
24472    pub title_align: Option<TitleAlignUnion>,
24473    #[serde(skip_serializing_if = "Option::is_none")]
24474    #[builder(default)]
24475    pub title_anchor: Option<TitleAnchorUnion>,
24476    #[serde(skip_serializing_if = "Option::is_none")]
24477    #[builder(default)]
24478    pub title_angle: Option<CornerRadiusUnion>,
24479    #[serde(skip_serializing_if = "Option::is_none")]
24480    #[builder(default)]
24481    pub title_baseline: Option<TextBaseline>,
24482    #[serde(skip_serializing_if = "Option::is_none")]
24483    #[builder(default)]
24484    pub title_color: Option<Box<Color>>,
24485    #[serde(skip_serializing_if = "Option::is_none")]
24486    #[builder(default)]
24487    pub title_font: Option<Box<Color>>,
24488    #[serde(skip_serializing_if = "Option::is_none")]
24489    #[builder(default)]
24490    pub title_font_size: Option<FontSize>,
24491    #[serde(skip_serializing_if = "Option::is_none")]
24492    #[builder(default)]
24493    pub title_font_style: Option<Box<Color>>,
24494    #[serde(skip_serializing_if = "Option::is_none")]
24495    #[builder(default)]
24496    pub title_font_weight: Option<FontWeightUnion>,
24497    #[serde(skip_serializing_if = "Option::is_none")]
24498    #[builder(default)]
24499    pub title_limit: Option<FontSize>,
24500    #[serde(skip_serializing_if = "Option::is_none")]
24501    #[builder(default)]
24502    pub title_line_height: Option<CornerRadiusUnion>,
24503    #[serde(skip_serializing_if = "Option::is_none")]
24504    #[builder(default)]
24505    pub title_opacity: Option<CornerRadiusUnion>,
24506    #[serde(skip_serializing_if = "Option::is_none")]
24507    #[builder(default)]
24508    pub title_padding: Option<CornerRadiusUnion>,
24509    #[serde(skip_serializing_if = "Option::is_none")]
24510    #[builder(default)]
24511    pub title_x: Option<CornerRadiusUnion>,
24512    #[serde(skip_serializing_if = "Option::is_none")]
24513    #[builder(default)]
24514    pub title_y: Option<CornerRadiusUnion>,
24515    #[serde(skip_serializing_if = "Option::is_none")]
24516    #[builder(default)]
24517    pub translate: Option<CornerRadiusUnion>,
24518    /// Explicitly set the visible axis tick values.
24519    #[serde(skip_serializing_if = "Option::is_none")]
24520    #[builder(default)]
24521    pub values: Option<Values>,
24522    /// A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be
24523    /// drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.
24524    ///
24525    /// __Default value:__ `0` (behind the marks).
24526    #[serde(skip_serializing_if = "Option::is_none")]
24527    #[builder(default)]
24528    pub zindex: Option<f64>,
24529}
24530
24531#[derive(Debug, Clone, Serialize, Deserialize)]
24532#[serde(untagged)]
24533#[derive(From)]
24534pub enum AxisBandGridDash {
24535    AmbitiousExprRef(AmbitiousExprRef),
24536    DoubleArray(Vec<f64>),
24537}
24538
24539/// An expression for an array of raw values that, if non-null, directly overrides the
24540/// _domain_ property. This is useful for supporting interactions such as panning or zooming
24541/// a scale. The scale may be initially determined using a data-driven domain, then modified
24542/// in response to user input by setting the rawDomain value.
24543#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
24544#[builder(setter(into, strip_option))]
24545pub struct AmbitiousExprRef {
24546    /// Vega expression (which can refer to Vega-Lite parameters).
24547    #[serde(skip_serializing_if = "Option::is_none")]
24548    #[builder(default)]
24549    pub expr: Option<String>,
24550    #[serde(skip_serializing_if = "Option::is_none")]
24551    #[builder(default)]
24552    pub condition: Option<TentacledConditionalPredicateValueDefNumberNullExprRef>,
24553    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
24554    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
24555    /// between `0` to `1` for opacity).
24556    #[serde(skip_serializing_if = "Option::is_none")]
24557    #[builder(default)]
24558    pub value: Option<Vec<f64>>,
24559}
24560
24561#[derive(Debug, Clone, Serialize, Deserialize)]
24562#[serde(untagged)]
24563#[derive(From)]
24564pub enum AxisBandTickDash {
24565    CunningExprRef(CunningExprRef),
24566    DoubleArray(Vec<f64>),
24567}
24568
24569/// An expression for an array of raw values that, if non-null, directly overrides the
24570/// _domain_ property. This is useful for supporting interactions such as panning or zooming
24571/// a scale. The scale may be initially determined using a data-driven domain, then modified
24572/// in response to user input by setting the rawDomain value.
24573#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
24574#[builder(setter(into, strip_option))]
24575pub struct CunningExprRef {
24576    /// Vega expression (which can refer to Vega-Lite parameters).
24577    #[serde(skip_serializing_if = "Option::is_none")]
24578    #[builder(default)]
24579    pub expr: Option<String>,
24580    #[serde(skip_serializing_if = "Option::is_none")]
24581    #[builder(default)]
24582    pub condition: Option<TentacledConditionalPredicateValueDefNumberNullExprRef>,
24583    /// A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient
24584    /// definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values
24585    /// between `0` to `1` for opacity).
24586    #[serde(skip_serializing_if = "Option::is_none")]
24587    #[builder(default)]
24588    pub value: Option<Vec<f64>>,
24589}
24590
24591/// Bar-Specific Config
24592#[derive(Debug, Clone, Serialize, Deserialize)]
24593#[serde(rename_all = "camelCase")]
24594#[derive(Default, Builder)]
24595#[builder(setter(into, strip_option))]
24596pub struct BarConfig {
24597    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
24598    /// of `"left"`, `"right"`, `"center"`.
24599    ///
24600    /// __Note:__ Expression reference is *not* supported for range marks.
24601    #[serde(skip_serializing_if = "Option::is_none")]
24602    #[builder(default)]
24603    pub align: Option<TitleAlignUnion>,
24604    #[serde(skip_serializing_if = "Option::is_none")]
24605    #[builder(default)]
24606    pub angle: Option<Angle>,
24607    #[serde(skip_serializing_if = "Option::is_none")]
24608    #[builder(default)]
24609    pub aria: Option<Aria>,
24610    #[serde(skip_serializing_if = "Option::is_none")]
24611    #[builder(default)]
24612    pub aria_role: Option<Box<Color>>,
24613    #[serde(skip_serializing_if = "Option::is_none")]
24614    #[builder(default)]
24615    pub aria_role_description: Option<Box<Color>>,
24616    #[serde(skip_serializing_if = "Option::is_none")]
24617    #[builder(default)]
24618    pub aspect: Option<Aria>,
24619    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
24620    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
24621    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
24622    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
24623    /// rather than `fontSize` alone.
24624    ///
24625    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
24626    /// `"bottom"`.
24627    ///
24628    /// __Note:__ Expression reference is *not* supported for range marks.
24629    #[serde(skip_serializing_if = "Option::is_none")]
24630    #[builder(default)]
24631    pub baseline: Option<TextBaseline>,
24632    /// Offset between bars for binned field. The ideal value for this is either 0 (preferred by
24633    /// statisticians) or 1 (Vega-Lite default, D3 example style).
24634    ///
24635    /// __Default value:__ `1`
24636    #[serde(skip_serializing_if = "Option::is_none")]
24637    #[builder(default)]
24638    pub bin_spacing: Option<f64>,
24639    #[serde(skip_serializing_if = "Option::is_none")]
24640    #[builder(default)]
24641    pub blend: Option<BlendUnion>,
24642    /// Default color.
24643    ///
24644    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
24645    ///
24646    /// __Note:__
24647    /// - This property cannot be used in a [style
24648    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
24649    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
24650    /// override `color`.
24651    #[serde(skip_serializing_if = "Option::is_none")]
24652    #[builder(default)]
24653    pub color: Option<MarkConfigColor>,
24654    /// The default size of the bars on continuous scales.
24655    ///
24656    /// __Default value:__ `5`
24657    #[serde(skip_serializing_if = "Option::is_none")]
24658    #[builder(default)]
24659    pub continuous_band_size: Option<f64>,
24660    #[serde(skip_serializing_if = "Option::is_none")]
24661    #[builder(default)]
24662    pub corner_radius: Option<CornerRadiusUnion>,
24663    #[serde(skip_serializing_if = "Option::is_none")]
24664    #[builder(default)]
24665    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
24666    #[serde(skip_serializing_if = "Option::is_none")]
24667    #[builder(default)]
24668    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
24669    /// - For vertical bars, top-left and top-right corner radius.
24670    ///
24671    /// - For horizontal bars, top-right and bottom-right corner radius.
24672    #[serde(skip_serializing_if = "Option::is_none")]
24673    #[builder(default)]
24674    pub corner_radius_end: Option<CornerRadiusUnion>,
24675    #[serde(skip_serializing_if = "Option::is_none")]
24676    #[builder(default)]
24677    pub corner_radius_top_left: Option<CornerRadiusUnion>,
24678    #[serde(skip_serializing_if = "Option::is_none")]
24679    #[builder(default)]
24680    pub corner_radius_top_right: Option<CornerRadiusUnion>,
24681    #[serde(skip_serializing_if = "Option::is_none")]
24682    #[builder(default)]
24683    pub cursor: Option<CursorUnion>,
24684    #[serde(skip_serializing_if = "Option::is_none")]
24685    #[builder(default)]
24686    pub description: Option<Box<Color>>,
24687    #[serde(skip_serializing_if = "Option::is_none")]
24688    #[builder(default)]
24689    pub dir: Option<Dir>,
24690    /// The default size of the bars with discrete dimensions. If unspecified, the default size
24691    /// is  `step-2`, which provides 2 pixel offset between bars.
24692    #[serde(skip_serializing_if = "Option::is_none")]
24693    #[builder(default)]
24694    pub discrete_band_size: Option<DiscreteBandSize>,
24695    #[serde(skip_serializing_if = "Option::is_none")]
24696    #[builder(default)]
24697    pub dx: Option<CornerRadiusUnion>,
24698    #[serde(skip_serializing_if = "Option::is_none")]
24699    #[builder(default)]
24700    pub dy: Option<CornerRadiusUnion>,
24701    #[serde(skip_serializing_if = "Option::is_none")]
24702    #[builder(default)]
24703    pub ellipsis: Option<Box<Color>>,
24704    #[serde(skip_serializing_if = "Option::is_none")]
24705    #[builder(default)]
24706    pub end_angle: Option<CornerRadiusUnion>,
24707    /// Default fill color. This property has higher precedence than `config.color`. Set to
24708    /// `null` to remove fill.
24709    ///
24710    /// __Default value:__ (None)
24711    #[serde(skip_serializing_if = "Option::is_none")]
24712    #[builder(default)]
24713    pub fill: Option<MarkConfigFill>,
24714    /// Whether the mark's color should be used as fill color instead of stroke color.
24715    ///
24716    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
24717    /// `geoshape` marks for
24718    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
24719    /// otherwise, `true`.
24720    ///
24721    /// __Note:__ This property cannot be used in a [style
24722    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
24723    #[serde(skip_serializing_if = "Option::is_none")]
24724    #[builder(default)]
24725    pub filled: Option<bool>,
24726    #[serde(skip_serializing_if = "Option::is_none")]
24727    #[builder(default)]
24728    pub fill_opacity: Option<Opacity>,
24729    #[serde(skip_serializing_if = "Option::is_none")]
24730    #[builder(default)]
24731    pub font: Option<Box<Color>>,
24732    #[serde(skip_serializing_if = "Option::is_none")]
24733    #[builder(default)]
24734    pub font_size: Option<FontSize>,
24735    #[serde(skip_serializing_if = "Option::is_none")]
24736    #[builder(default)]
24737    pub font_style: Option<Box<Color>>,
24738    #[serde(skip_serializing_if = "Option::is_none")]
24739    #[builder(default)]
24740    pub font_weight: Option<FontWeightUnion>,
24741    #[serde(skip_serializing_if = "Option::is_none")]
24742    #[builder(default)]
24743    pub height: Option<CornerRadiusUnion>,
24744    #[serde(skip_serializing_if = "Option::is_none")]
24745    #[builder(default)]
24746    pub href: Option<Box<Color>>,
24747    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
24748    ///
24749    /// __Default value:__ `0`
24750    #[serde(skip_serializing_if = "Option::is_none")]
24751    #[builder(default)]
24752    pub inner_radius: Option<CornerRadiusUnion>,
24753    #[serde(skip_serializing_if = "Option::is_none")]
24754    #[builder(default)]
24755    pub interpolate: Option<MarkConfigInterpolate>,
24756    /// Invalid data mode, which defines how the marks and corresponding scales should represent
24757    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
24758    /// invalid values).
24759    ///
24760    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
24761    /// *scales*. For path marks (for line, area, trail), this option will create paths that
24762    /// connect valid points, as if the data rows with invalid values do not exist.
24763    ///
24764    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
24765    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
24766    /// *exclude* these filtered data points.
24767    ///
24768    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
24769    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
24770    /// data points (for both path and non-path marks).
24771    ///
24772    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
24773    /// will use the output for invalid values defined in `config.scale.invalid` or, if
24774    /// unspecified, by default invalid values will produce the same visual values as zero (if
24775    /// the scale includes zero) or the minimum value (if the scale does not include zero).
24776    ///
24777    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
24778    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
24779    /// non-path marks.
24780    ///
24781    /// __Note__: If any channel's scale has an output for invalid values defined in
24782    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
24783    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
24784    /// be filtered and will not cause path breaks.
24785    #[serde(skip_serializing_if = "Option::is_none")]
24786    #[builder(default)]
24787    pub invalid: Option<MarkInvalidDataMode>,
24788    #[serde(skip_serializing_if = "Option::is_none")]
24789    #[builder(default)]
24790    pub limit: Option<CornerRadiusUnion>,
24791    #[serde(skip_serializing_if = "Option::is_none")]
24792    #[builder(default)]
24793    pub line_break: Option<Box<Color>>,
24794    #[serde(skip_serializing_if = "Option::is_none")]
24795    #[builder(default)]
24796    pub line_height: Option<CornerRadiusUnion>,
24797    /// The minimum band size for bar and rectangle marks. __Default value:__ `0.25`
24798    #[serde(skip_serializing_if = "Option::is_none")]
24799    #[builder(default)]
24800    pub min_band_size: Option<CornerRadiusUnion>,
24801    /// The overall opacity (value between [0,1]).
24802    ///
24803    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
24804    /// `square` marks or layered `bar` charts and `1` otherwise.
24805    #[serde(skip_serializing_if = "Option::is_none")]
24806    #[builder(default)]
24807    pub opacity: Option<CornerRadiusUnion>,
24808    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
24809    /// the lines use the original order in the data sources.
24810    #[serde(skip_serializing_if = "Option::is_none")]
24811    #[builder(default)]
24812    pub order: Option<bool>,
24813    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
24814    /// horizontal (default) or vertical.
24815    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
24816    /// applied to x or y dimension.
24817    /// - For area, this property determines the orient property of the Vega output.
24818    /// - For line and trail marks, this property determines the sort order of the points in the
24819    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
24820    /// determined by the orientation of the stack; therefore explicitly specified value will be
24821    /// ignored.
24822    #[serde(skip_serializing_if = "Option::is_none")]
24823    #[builder(default)]
24824    pub orient: Option<Orientation>,
24825    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
24826    ///
24827    /// __Default value:__ `0`
24828    #[serde(skip_serializing_if = "Option::is_none")]
24829    #[builder(default)]
24830    pub outer_radius: Option<CornerRadiusUnion>,
24831    #[serde(skip_serializing_if = "Option::is_none")]
24832    #[builder(default)]
24833    pub pad_angle: Option<CornerRadiusUnion>,
24834    /// For arc mark, the primary (outer) radius in pixels.
24835    ///
24836    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
24837    /// determined by the `x` and `y` properties.
24838    ///
24839    /// __Default value:__ `min(plot_width, plot_height)/2`
24840    #[serde(skip_serializing_if = "Option::is_none")]
24841    #[builder(default)]
24842    pub radius: Option<CornerRadiusUnion>,
24843    /// The secondary (inner) radius in pixels of arc marks.
24844    ///
24845    /// __Default value:__ `0`
24846    #[serde(skip_serializing_if = "Option::is_none")]
24847    #[builder(default)]
24848    pub radius2: Option<CornerRadiusUnion>,
24849    #[serde(skip_serializing_if = "Option::is_none")]
24850    #[builder(default)]
24851    pub shape: Option<Box<Color>>,
24852    /// Default size for marks.
24853    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
24854    /// this value sets the area of the symbol; the side lengths will increase with the square
24855    /// root of this value.
24856    /// - For `bar`, this represents the band size of the bar, in pixels.
24857    /// - For `text`, this represents the font size, in pixels.
24858    ///
24859    /// __Default value:__
24860    /// - `30` for point, circle, square marks; width/height's `step`
24861    /// - `2` for bar marks with discrete dimensions;
24862    /// - `5` for bar marks with continuous dimensions;
24863    /// - `11` for text marks.
24864    #[serde(skip_serializing_if = "Option::is_none")]
24865    #[builder(default)]
24866    pub size: Option<CornerRadiusUnion>,
24867    #[serde(skip_serializing_if = "Option::is_none")]
24868    #[builder(default)]
24869    pub smooth: Option<Aria>,
24870    #[serde(skip_serializing_if = "Option::is_none")]
24871    #[builder(default)]
24872    pub start_angle: Option<CornerRadiusUnion>,
24873    /// Default stroke color. This property has higher precedence than `config.color`. Set to
24874    /// `null` to remove stroke.
24875    ///
24876    /// __Default value:__ (None)
24877    #[serde(skip_serializing_if = "Option::is_none")]
24878    #[builder(default)]
24879    pub stroke: Option<MarkConfigFill>,
24880    #[serde(skip_serializing_if = "Option::is_none")]
24881    #[builder(default)]
24882    pub stroke_cap: Option<Cap>,
24883    #[serde(skip_serializing_if = "Option::is_none")]
24884    #[builder(default)]
24885    pub stroke_dash: Option<StrokeDashUnion>,
24886    #[serde(skip_serializing_if = "Option::is_none")]
24887    #[builder(default)]
24888    pub stroke_dash_offset: Option<CornerRadiusUnion>,
24889    #[serde(skip_serializing_if = "Option::is_none")]
24890    #[builder(default)]
24891    pub stroke_join: Option<StrokeJoinUnion>,
24892    #[serde(skip_serializing_if = "Option::is_none")]
24893    #[builder(default)]
24894    pub stroke_miter_limit: Option<CornerRadiusUnion>,
24895    #[serde(skip_serializing_if = "Option::is_none")]
24896    #[builder(default)]
24897    pub stroke_offset: Option<CornerRadiusUnion>,
24898    #[serde(skip_serializing_if = "Option::is_none")]
24899    #[builder(default)]
24900    pub stroke_opacity: Option<Opacity>,
24901    #[serde(skip_serializing_if = "Option::is_none")]
24902    #[builder(default)]
24903    pub stroke_width: Option<FontSize>,
24904    #[serde(skip_serializing_if = "Option::is_none")]
24905    #[builder(default)]
24906    pub tension: Option<CornerRadiusUnion>,
24907    #[serde(skip_serializing_if = "Option::is_none")]
24908    #[builder(default)]
24909    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
24910    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
24911    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
24912    /// clockwise.)
24913    ///
24914    /// - For text marks, polar coordinate angle in radians.
24915    #[serde(skip_serializing_if = "Option::is_none")]
24916    #[builder(default)]
24917    pub theta: Option<CornerRadiusUnion>,
24918    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
24919    /// values proceed clockwise.
24920    #[serde(skip_serializing_if = "Option::is_none")]
24921    #[builder(default)]
24922    pub theta2: Option<CornerRadiusUnion>,
24923    #[serde(skip_serializing_if = "Option::is_none")]
24924    #[builder(default)]
24925    pub time: Option<CornerRadiusUnion>,
24926    /// Default relative band position for a time unit. If set to `0`, the marks will be
24927    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
24928    /// be positioned in the middle of the time unit band step.
24929    #[serde(skip_serializing_if = "Option::is_none")]
24930    #[builder(default)]
24931    pub time_unit_band_position: Option<f64>,
24932    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
24933    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
24934    /// half of the time unit band step.
24935    #[serde(skip_serializing_if = "Option::is_none")]
24936    #[builder(default)]
24937    pub time_unit_band_size: Option<f64>,
24938    /// The tooltip text string to show upon mouse hover or an object defining which fields
24939    /// should the tooltip be derived from.
24940    ///
24941    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
24942    /// will be used.
24943    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
24944    /// data point will be used.
24945    /// - If set to `null` or `false`, then no tooltip will be used.
24946    ///
24947    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
24948    /// a detailed discussion about tooltip  in Vega-Lite.
24949    ///
24950    /// __Default value:__ `null`
24951    #[serde(skip_serializing_if = "Option::is_none")]
24952    #[builder(default)]
24953    pub tooltip: Option<OverlayMarkDefTooltip>,
24954    #[serde(skip_serializing_if = "Option::is_none")]
24955    #[builder(default)]
24956    pub url: Option<Box<Color>>,
24957    #[serde(skip_serializing_if = "Option::is_none")]
24958    #[builder(default)]
24959    pub width: Option<CornerRadiusUnion>,
24960    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
24961    /// `x2` or `width`.
24962    ///
24963    /// The `value` of this channel can be a number or a string `"width"` for the width of the
24964    /// plot.
24965    #[serde(skip_serializing_if = "Option::is_none")]
24966    #[builder(default)]
24967    pub x: Option<XUnion>,
24968    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
24969    ///
24970    /// The `value` of this channel can be a number or a string `"width"` for the width of the
24971    /// plot.
24972    #[serde(skip_serializing_if = "Option::is_none")]
24973    #[builder(default)]
24974    pub x2: Option<XUnion>,
24975    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
24976    /// `y2` or `height`.
24977    ///
24978    /// The `value` of this channel can be a number or a string `"height"` for the height of the
24979    /// plot.
24980    #[serde(skip_serializing_if = "Option::is_none")]
24981    #[builder(default)]
24982    pub y: Option<YUnion>,
24983    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
24984    ///
24985    /// The `value` of this channel can be a number or a string `"height"` for the height of the
24986    /// plot.
24987    #[serde(skip_serializing_if = "Option::is_none")]
24988    #[builder(default)]
24989    pub y2: Option<YUnion>,
24990}
24991
24992/// Box Config
24993#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
24994#[builder(setter(into, strip_option))]
24995pub struct BoxPlotConfig {
24996    #[serde(rename = "box")]
24997    #[serde(skip_serializing_if = "Option::is_none")]
24998    #[builder(default)]
24999    pub box_plot_config_box: Option<AnyMarkConfig>,
25000    /// The extent of the whiskers. Available options include:
25001    /// - `"min-max"`: min and max are the lower and upper whiskers respectively.
25002    /// - A number representing multiple of the interquartile range. This number will be
25003    /// multiplied by the IQR to determine whisker boundary, which spans from the smallest data
25004    /// to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_
25005    /// are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).
25006    ///
25007    /// __Default value:__ `1.5`.
25008    #[serde(skip_serializing_if = "Option::is_none")]
25009    #[builder(default)]
25010    pub extent: Option<BoxplotExtent>,
25011    #[serde(skip_serializing_if = "Option::is_none")]
25012    #[builder(default)]
25013    pub median: Option<AnyMarkConfig>,
25014    #[serde(skip_serializing_if = "Option::is_none")]
25015    #[builder(default)]
25016    pub outliers: Option<AnyMarkConfig>,
25017    #[serde(skip_serializing_if = "Option::is_none")]
25018    #[builder(default)]
25019    pub rule: Option<AnyMarkConfig>,
25020    /// Size of the box and median tick of a box plot
25021    #[serde(skip_serializing_if = "Option::is_none")]
25022    #[builder(default)]
25023    pub size: Option<f64>,
25024    #[serde(skip_serializing_if = "Option::is_none")]
25025    #[builder(default)]
25026    pub ticks: Option<AnyMarkConfig>,
25027}
25028
25029/// The extent of the whiskers. Available options include:
25030/// - `"min-max"`: min and max are the lower and upper whiskers respectively.
25031/// - A number representing multiple of the interquartile range. This number will be
25032/// multiplied by the IQR to determine whisker boundary, which spans from the smallest data
25033/// to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_
25034/// are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).
25035///
25036/// __Default value:__ `1.5`.
25037#[derive(Debug, Clone, Serialize, Deserialize)]
25038#[serde(untagged)]
25039#[derive(From)]
25040pub enum BoxplotExtent {
25041    Double(f64),
25042    Enum(ExtentEnum),
25043}
25044
25045#[derive(Debug, Clone, Serialize, Deserialize)]
25046#[serde(rename_all = "kebab-case")]
25047pub enum ExtentEnum {
25048    #[serde(rename = "min-max")]
25049    MinMax,
25050}
25051
25052/// Circle-Specific Config
25053///
25054/// Geoshape-Specific Config
25055///
25056/// Mark Config
25057///
25058/// Point-Specific Config
25059///
25060/// Rule-Specific Config
25061///
25062/// Square-Specific Config
25063///
25064/// Default style for chart subtitles
25065///
25066/// Default style for chart titles
25067///
25068/// Default style for axis, legend, and header labels.
25069///
25070/// Default style for axis, legend, and header titles.
25071///
25072/// Text-Specific Config
25073#[derive(Debug, Clone, Serialize, Deserialize)]
25074#[serde(rename_all = "camelCase")]
25075#[derive(Default, Builder)]
25076#[builder(setter(into, strip_option))]
25077pub struct MarkConfig {
25078    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
25079    /// of `"left"`, `"right"`, `"center"`.
25080    ///
25081    /// __Note:__ Expression reference is *not* supported for range marks.
25082    #[serde(skip_serializing_if = "Option::is_none")]
25083    #[builder(default)]
25084    pub align: Option<TitleAlignUnion>,
25085    #[serde(skip_serializing_if = "Option::is_none")]
25086    #[builder(default)]
25087    pub angle: Option<Angle>,
25088    #[serde(skip_serializing_if = "Option::is_none")]
25089    #[builder(default)]
25090    pub aria: Option<Aria>,
25091    #[serde(skip_serializing_if = "Option::is_none")]
25092    #[builder(default)]
25093    pub aria_role: Option<Box<Color>>,
25094    #[serde(skip_serializing_if = "Option::is_none")]
25095    #[builder(default)]
25096    pub aria_role_description: Option<Box<Color>>,
25097    #[serde(skip_serializing_if = "Option::is_none")]
25098    #[builder(default)]
25099    pub aspect: Option<Aria>,
25100    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
25101    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
25102    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
25103    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
25104    /// rather than `fontSize` alone.
25105    ///
25106    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
25107    /// `"bottom"`.
25108    ///
25109    /// __Note:__ Expression reference is *not* supported for range marks.
25110    #[serde(skip_serializing_if = "Option::is_none")]
25111    #[builder(default)]
25112    pub baseline: Option<TextBaseline>,
25113    #[serde(skip_serializing_if = "Option::is_none")]
25114    #[builder(default)]
25115    pub blend: Option<BlendUnion>,
25116    /// Default color.
25117    ///
25118    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
25119    ///
25120    /// __Note:__
25121    /// - This property cannot be used in a [style
25122    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
25123    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
25124    /// override `color`.
25125    #[serde(skip_serializing_if = "Option::is_none")]
25126    #[builder(default)]
25127    pub color: Option<MarkConfigColor>,
25128    #[serde(skip_serializing_if = "Option::is_none")]
25129    #[builder(default)]
25130    pub corner_radius: Option<CornerRadiusUnion>,
25131    #[serde(skip_serializing_if = "Option::is_none")]
25132    #[builder(default)]
25133    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
25134    #[serde(skip_serializing_if = "Option::is_none")]
25135    #[builder(default)]
25136    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
25137    #[serde(skip_serializing_if = "Option::is_none")]
25138    #[builder(default)]
25139    pub corner_radius_top_left: Option<CornerRadiusUnion>,
25140    #[serde(skip_serializing_if = "Option::is_none")]
25141    #[builder(default)]
25142    pub corner_radius_top_right: Option<CornerRadiusUnion>,
25143    #[serde(skip_serializing_if = "Option::is_none")]
25144    #[builder(default)]
25145    pub cursor: Option<CursorUnion>,
25146    #[serde(skip_serializing_if = "Option::is_none")]
25147    #[builder(default)]
25148    pub description: Option<Box<Color>>,
25149    #[serde(skip_serializing_if = "Option::is_none")]
25150    #[builder(default)]
25151    pub dir: Option<Dir>,
25152    #[serde(skip_serializing_if = "Option::is_none")]
25153    #[builder(default)]
25154    pub dx: Option<CornerRadiusUnion>,
25155    #[serde(skip_serializing_if = "Option::is_none")]
25156    #[builder(default)]
25157    pub dy: Option<CornerRadiusUnion>,
25158    #[serde(skip_serializing_if = "Option::is_none")]
25159    #[builder(default)]
25160    pub ellipsis: Option<Box<Color>>,
25161    #[serde(skip_serializing_if = "Option::is_none")]
25162    #[builder(default)]
25163    pub end_angle: Option<CornerRadiusUnion>,
25164    /// Default fill color. This property has higher precedence than `config.color`. Set to
25165    /// `null` to remove fill.
25166    ///
25167    /// __Default value:__ (None)
25168    #[serde(skip_serializing_if = "Option::is_none")]
25169    #[builder(default)]
25170    pub fill: Option<MarkConfigFill>,
25171    /// Whether the mark's color should be used as fill color instead of stroke color.
25172    ///
25173    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
25174    /// `geoshape` marks for
25175    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
25176    /// otherwise, `true`.
25177    ///
25178    /// __Note:__ This property cannot be used in a [style
25179    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
25180    #[serde(skip_serializing_if = "Option::is_none")]
25181    #[builder(default)]
25182    pub filled: Option<bool>,
25183    #[serde(skip_serializing_if = "Option::is_none")]
25184    #[builder(default)]
25185    pub fill_opacity: Option<Opacity>,
25186    #[serde(skip_serializing_if = "Option::is_none")]
25187    #[builder(default)]
25188    pub font: Option<Box<Color>>,
25189    #[serde(skip_serializing_if = "Option::is_none")]
25190    #[builder(default)]
25191    pub font_size: Option<FontSize>,
25192    #[serde(skip_serializing_if = "Option::is_none")]
25193    #[builder(default)]
25194    pub font_style: Option<Box<Color>>,
25195    #[serde(skip_serializing_if = "Option::is_none")]
25196    #[builder(default)]
25197    pub font_weight: Option<FontWeightUnion>,
25198    #[serde(skip_serializing_if = "Option::is_none")]
25199    #[builder(default)]
25200    pub height: Option<CornerRadiusUnion>,
25201    #[serde(skip_serializing_if = "Option::is_none")]
25202    #[builder(default)]
25203    pub href: Option<Box<Color>>,
25204    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
25205    ///
25206    /// __Default value:__ `0`
25207    #[serde(skip_serializing_if = "Option::is_none")]
25208    #[builder(default)]
25209    pub inner_radius: Option<CornerRadiusUnion>,
25210    #[serde(skip_serializing_if = "Option::is_none")]
25211    #[builder(default)]
25212    pub interpolate: Option<MarkConfigInterpolate>,
25213    /// Invalid data mode, which defines how the marks and corresponding scales should represent
25214    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
25215    /// invalid values).
25216    ///
25217    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
25218    /// *scales*. For path marks (for line, area, trail), this option will create paths that
25219    /// connect valid points, as if the data rows with invalid values do not exist.
25220    ///
25221    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
25222    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
25223    /// *exclude* these filtered data points.
25224    ///
25225    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
25226    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
25227    /// data points (for both path and non-path marks).
25228    ///
25229    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
25230    /// will use the output for invalid values defined in `config.scale.invalid` or, if
25231    /// unspecified, by default invalid values will produce the same visual values as zero (if
25232    /// the scale includes zero) or the minimum value (if the scale does not include zero).
25233    ///
25234    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
25235    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
25236    /// non-path marks.
25237    ///
25238    /// __Note__: If any channel's scale has an output for invalid values defined in
25239    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
25240    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
25241    /// be filtered and will not cause path breaks.
25242    #[serde(skip_serializing_if = "Option::is_none")]
25243    #[builder(default)]
25244    pub invalid: Option<MarkInvalidDataMode>,
25245    #[serde(skip_serializing_if = "Option::is_none")]
25246    #[builder(default)]
25247    pub limit: Option<CornerRadiusUnion>,
25248    #[serde(skip_serializing_if = "Option::is_none")]
25249    #[builder(default)]
25250    pub line_break: Option<Box<Color>>,
25251    #[serde(skip_serializing_if = "Option::is_none")]
25252    #[builder(default)]
25253    pub line_height: Option<CornerRadiusUnion>,
25254    /// The overall opacity (value between [0,1]).
25255    ///
25256    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
25257    /// `square` marks or layered `bar` charts and `1` otherwise.
25258    #[serde(skip_serializing_if = "Option::is_none")]
25259    #[builder(default)]
25260    pub opacity: Option<CornerRadiusUnion>,
25261    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
25262    /// the lines use the original order in the data sources.
25263    #[serde(skip_serializing_if = "Option::is_none")]
25264    #[builder(default)]
25265    pub order: Option<bool>,
25266    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
25267    /// horizontal (default) or vertical.
25268    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
25269    /// applied to x or y dimension.
25270    /// - For area, this property determines the orient property of the Vega output.
25271    /// - For line and trail marks, this property determines the sort order of the points in the
25272    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
25273    /// determined by the orientation of the stack; therefore explicitly specified value will be
25274    /// ignored.
25275    #[serde(skip_serializing_if = "Option::is_none")]
25276    #[builder(default)]
25277    pub orient: Option<Orientation>,
25278    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
25279    ///
25280    /// __Default value:__ `0`
25281    #[serde(skip_serializing_if = "Option::is_none")]
25282    #[builder(default)]
25283    pub outer_radius: Option<CornerRadiusUnion>,
25284    #[serde(skip_serializing_if = "Option::is_none")]
25285    #[builder(default)]
25286    pub pad_angle: Option<CornerRadiusUnion>,
25287    /// For arc mark, the primary (outer) radius in pixels.
25288    ///
25289    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
25290    /// determined by the `x` and `y` properties.
25291    ///
25292    /// __Default value:__ `min(plot_width, plot_height)/2`
25293    #[serde(skip_serializing_if = "Option::is_none")]
25294    #[builder(default)]
25295    pub radius: Option<CornerRadiusUnion>,
25296    /// The secondary (inner) radius in pixels of arc marks.
25297    ///
25298    /// __Default value:__ `0`
25299    #[serde(skip_serializing_if = "Option::is_none")]
25300    #[builder(default)]
25301    pub radius2: Option<CornerRadiusUnion>,
25302    #[serde(skip_serializing_if = "Option::is_none")]
25303    #[builder(default)]
25304    pub shape: Option<Box<Color>>,
25305    /// Default size for marks.
25306    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
25307    /// this value sets the area of the symbol; the side lengths will increase with the square
25308    /// root of this value.
25309    /// - For `bar`, this represents the band size of the bar, in pixels.
25310    /// - For `text`, this represents the font size, in pixels.
25311    ///
25312    /// __Default value:__
25313    /// - `30` for point, circle, square marks; width/height's `step`
25314    /// - `2` for bar marks with discrete dimensions;
25315    /// - `5` for bar marks with continuous dimensions;
25316    /// - `11` for text marks.
25317    #[serde(skip_serializing_if = "Option::is_none")]
25318    #[builder(default)]
25319    pub size: Option<CornerRadiusUnion>,
25320    #[serde(skip_serializing_if = "Option::is_none")]
25321    #[builder(default)]
25322    pub smooth: Option<Aria>,
25323    #[serde(skip_serializing_if = "Option::is_none")]
25324    #[builder(default)]
25325    pub start_angle: Option<CornerRadiusUnion>,
25326    /// Default stroke color. This property has higher precedence than `config.color`. Set to
25327    /// `null` to remove stroke.
25328    ///
25329    /// __Default value:__ (None)
25330    #[serde(skip_serializing_if = "Option::is_none")]
25331    #[builder(default)]
25332    pub stroke: Option<MarkConfigFill>,
25333    #[serde(skip_serializing_if = "Option::is_none")]
25334    #[builder(default)]
25335    pub stroke_cap: Option<Cap>,
25336    #[serde(skip_serializing_if = "Option::is_none")]
25337    #[builder(default)]
25338    pub stroke_dash: Option<StrokeDashUnion>,
25339    #[serde(skip_serializing_if = "Option::is_none")]
25340    #[builder(default)]
25341    pub stroke_dash_offset: Option<CornerRadiusUnion>,
25342    #[serde(skip_serializing_if = "Option::is_none")]
25343    #[builder(default)]
25344    pub stroke_join: Option<StrokeJoinUnion>,
25345    #[serde(skip_serializing_if = "Option::is_none")]
25346    #[builder(default)]
25347    pub stroke_miter_limit: Option<CornerRadiusUnion>,
25348    #[serde(skip_serializing_if = "Option::is_none")]
25349    #[builder(default)]
25350    pub stroke_offset: Option<CornerRadiusUnion>,
25351    #[serde(skip_serializing_if = "Option::is_none")]
25352    #[builder(default)]
25353    pub stroke_opacity: Option<Opacity>,
25354    #[serde(skip_serializing_if = "Option::is_none")]
25355    #[builder(default)]
25356    pub stroke_width: Option<FontSize>,
25357    #[serde(skip_serializing_if = "Option::is_none")]
25358    #[builder(default)]
25359    pub tension: Option<CornerRadiusUnion>,
25360    #[serde(skip_serializing_if = "Option::is_none")]
25361    #[builder(default)]
25362    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
25363    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
25364    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
25365    /// clockwise.)
25366    ///
25367    /// - For text marks, polar coordinate angle in radians.
25368    #[serde(skip_serializing_if = "Option::is_none")]
25369    #[builder(default)]
25370    pub theta: Option<CornerRadiusUnion>,
25371    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
25372    /// values proceed clockwise.
25373    #[serde(skip_serializing_if = "Option::is_none")]
25374    #[builder(default)]
25375    pub theta2: Option<CornerRadiusUnion>,
25376    #[serde(skip_serializing_if = "Option::is_none")]
25377    #[builder(default)]
25378    pub time: Option<CornerRadiusUnion>,
25379    /// Default relative band position for a time unit. If set to `0`, the marks will be
25380    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
25381    /// be positioned in the middle of the time unit band step.
25382    #[serde(skip_serializing_if = "Option::is_none")]
25383    #[builder(default)]
25384    pub time_unit_band_position: Option<f64>,
25385    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
25386    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
25387    /// half of the time unit band step.
25388    #[serde(skip_serializing_if = "Option::is_none")]
25389    #[builder(default)]
25390    pub time_unit_band_size: Option<f64>,
25391    /// The tooltip text string to show upon mouse hover or an object defining which fields
25392    /// should the tooltip be derived from.
25393    ///
25394    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
25395    /// will be used.
25396    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
25397    /// data point will be used.
25398    /// - If set to `null` or `false`, then no tooltip will be used.
25399    ///
25400    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
25401    /// a detailed discussion about tooltip  in Vega-Lite.
25402    ///
25403    /// __Default value:__ `null`
25404    #[serde(skip_serializing_if = "Option::is_none")]
25405    #[builder(default)]
25406    pub tooltip: Option<OverlayMarkDefTooltip>,
25407    #[serde(skip_serializing_if = "Option::is_none")]
25408    #[builder(default)]
25409    pub url: Option<Box<Color>>,
25410    #[serde(skip_serializing_if = "Option::is_none")]
25411    #[builder(default)]
25412    pub width: Option<CornerRadiusUnion>,
25413    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
25414    /// `x2` or `width`.
25415    ///
25416    /// The `value` of this channel can be a number or a string `"width"` for the width of the
25417    /// plot.
25418    #[serde(skip_serializing_if = "Option::is_none")]
25419    #[builder(default)]
25420    pub x: Option<XUnion>,
25421    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
25422    ///
25423    /// The `value` of this channel can be a number or a string `"width"` for the width of the
25424    /// plot.
25425    #[serde(skip_serializing_if = "Option::is_none")]
25426    #[builder(default)]
25427    pub x2: Option<XUnion>,
25428    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
25429    /// `y2` or `height`.
25430    ///
25431    /// The `value` of this channel can be a number or a string `"height"` for the height of the
25432    /// plot.
25433    #[serde(skip_serializing_if = "Option::is_none")]
25434    #[builder(default)]
25435    pub y: Option<YUnion>,
25436    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
25437    ///
25438    /// The `value` of this channel can be a number or a string `"height"` for the height of the
25439    /// plot.
25440    #[serde(skip_serializing_if = "Option::is_none")]
25441    #[builder(default)]
25442    pub y2: Option<YUnion>,
25443}
25444
25445/// Default configuration for all concatenation and repeat view composition operators
25446/// (`concat`, `hconcat`, `vconcat`, and `repeat`)
25447///
25448/// Default configuration for the `facet` view composition operator
25449#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
25450#[builder(setter(into, strip_option))]
25451pub struct CompositionConfig {
25452    /// The number of columns to include in the view composition layout.
25453    ///
25454    /// __Default value__: `undefined` -- An infinite number of columns (a single row) will be
25455    /// assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel
25456    /// (for `facet` and `repeat`).
25457    ///
25458    /// __Note__:
25459    ///
25460    /// 1) This property is only for:
25461    /// - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)
25462    /// - the `facet` and `repeat` operator with one field/repetition definition (without
25463    /// row/column nesting)
25464    ///
25465    /// 2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using
25466    /// the `row` channel (for `facet` and `repeat`).
25467    #[serde(skip_serializing_if = "Option::is_none")]
25468    #[builder(default)]
25469    pub columns: Option<f64>,
25470    /// The default spacing in pixels between composed sub-views.
25471    ///
25472    /// __Default value__: `20`
25473    #[serde(skip_serializing_if = "Option::is_none")]
25474    #[builder(default)]
25475    pub spacing: Option<f64>,
25476}
25477
25478/// ErrorBand Config
25479#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
25480#[builder(setter(into, strip_option))]
25481pub struct ErrorBandConfig {
25482    #[serde(skip_serializing_if = "Option::is_none")]
25483    #[builder(default)]
25484    pub band: Option<AnyMarkConfig>,
25485    #[serde(skip_serializing_if = "Option::is_none")]
25486    #[builder(default)]
25487    pub borders: Option<AnyMarkConfig>,
25488    /// The extent of the band. Available options include:
25489    /// - `"ci"`: Extend the band to the 95% bootstrapped confidence interval of the mean.
25490    /// - `"stderr"`: The size of band are set to the value of standard error, extending from the
25491    /// mean.
25492    /// - `"stdev"`: The size of band are set to the value of standard deviation, extending from
25493    /// the mean.
25494    /// - `"iqr"`: Extend the band to the q1 and q3.
25495    ///
25496    /// __Default value:__ `"stderr"`.
25497    #[serde(skip_serializing_if = "Option::is_none")]
25498    #[builder(default)]
25499    pub extent: Option<ErrorbandExtent>,
25500    /// The line interpolation method for the error band. One of the following:
25501    /// - `"linear"`: piecewise linear segments, as in a polyline.
25502    /// - `"linear-closed"`: close the linear segments to form a polygon.
25503    /// - `"step"`: a piecewise constant function (a step function) consisting of alternating
25504    /// horizontal and vertical lines. The y-value changes at the midpoint of each pair of
25505    /// adjacent x-values.
25506    /// - `"step-before"`: a piecewise constant function (a step function) consisting of
25507    /// alternating horizontal and vertical lines. The y-value changes before the x-value.
25508    /// - `"step-after"`: a piecewise constant function (a step function) consisting of
25509    /// alternating horizontal and vertical lines. The y-value changes after the x-value.
25510    /// - `"basis"`: a B-spline, with control point duplication on the ends.
25511    /// - `"basis-open"`: an open B-spline; may not intersect the start or end.
25512    /// - `"basis-closed"`: a closed B-spline, as in a loop.
25513    /// - `"cardinal"`: a Cardinal spline, with control point duplication on the ends.
25514    /// - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but
25515    /// will intersect other control points.
25516    /// - `"cardinal-closed"`: a closed Cardinal spline, as in a loop.
25517    /// - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the
25518    /// spline.
25519    /// - `"monotone"`: cubic interpolation that preserves monotonicity in y.
25520    #[serde(skip_serializing_if = "Option::is_none")]
25521    #[builder(default)]
25522    pub interpolate: Option<Interpolate>,
25523    /// The tension parameter for the interpolation type of the error band.
25524    #[serde(skip_serializing_if = "Option::is_none")]
25525    #[builder(default)]
25526    pub tension: Option<f64>,
25527}
25528
25529/// The extent of the band. Available options include:
25530/// - `"ci"`: Extend the band to the 95% bootstrapped confidence interval of the mean.
25531/// - `"stderr"`: The size of band are set to the value of standard error, extending from the
25532/// mean.
25533/// - `"stdev"`: The size of band are set to the value of standard deviation, extending from
25534/// the mean.
25535/// - `"iqr"`: Extend the band to the q1 and q3.
25536///
25537/// __Default value:__ `"stderr"`.
25538///
25539/// The extent of the rule. Available options include:
25540/// - `"ci"`: Extend the rule to the 95% bootstrapped confidence interval of the mean.
25541/// - `"stderr"`: The size of rule are set to the value of standard error, extending from the
25542/// mean.
25543/// - `"stdev"`: The size of rule are set to the value of standard deviation, extending from
25544/// the mean.
25545/// - `"iqr"`: Extend the rule to the q1 and q3.
25546///
25547/// __Default value:__ `"stderr"`.
25548#[derive(Debug, Clone, Serialize, Deserialize)]
25549#[serde(rename_all = "snake_case")]
25550pub enum ErrorbandExtent {
25551    Ci,
25552    Iqr,
25553    Stderr,
25554    Stdev,
25555}
25556
25557/// ErrorBar Config
25558#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
25559#[builder(setter(into, strip_option))]
25560pub struct ErrorBarConfig {
25561    /// The extent of the rule. Available options include:
25562    /// - `"ci"`: Extend the rule to the 95% bootstrapped confidence interval of the mean.
25563    /// - `"stderr"`: The size of rule are set to the value of standard error, extending from the
25564    /// mean.
25565    /// - `"stdev"`: The size of rule are set to the value of standard deviation, extending from
25566    /// the mean.
25567    /// - `"iqr"`: Extend the rule to the q1 and q3.
25568    ///
25569    /// __Default value:__ `"stderr"`.
25570    #[serde(skip_serializing_if = "Option::is_none")]
25571    #[builder(default)]
25572    pub extent: Option<ErrorbandExtent>,
25573    #[serde(skip_serializing_if = "Option::is_none")]
25574    #[builder(default)]
25575    pub rule: Option<AnyMarkConfig>,
25576    /// Size of the ticks of an error bar
25577    #[serde(skip_serializing_if = "Option::is_none")]
25578    #[builder(default)]
25579    pub size: Option<f64>,
25580    /// Thickness of the ticks and the bar of an error bar
25581    #[serde(skip_serializing_if = "Option::is_none")]
25582    #[builder(default)]
25583    pub thickness: Option<f64>,
25584    #[serde(skip_serializing_if = "Option::is_none")]
25585    #[builder(default)]
25586    pub ticks: Option<AnyMarkConfig>,
25587}
25588
25589/// Defines how Vega-Lite generates title for fields. There are three possible styles:
25590/// - `"verbal"` (Default) - displays function in a verbal style (e.g., "Sum of field",
25591/// "Year-month of date", "field (binned)").
25592/// - `"function"` - displays function using parentheses and capitalized texts (e.g.,
25593/// "SUM(field)", "YEARMONTH(date)", "BIN(field)").
25594/// - `"plain"` - displays only the field name without functions (e.g., "field", "date",
25595/// "field").
25596#[derive(Debug, Clone, Serialize, Deserialize)]
25597#[serde(rename_all = "snake_case")]
25598pub enum FieldTitle {
25599    Functional,
25600    Plain,
25601    Verbal,
25602}
25603
25604/// Header configuration, which determines default properties for all
25605/// [headers](https://vega.github.io/vega-lite/docs/header.html).
25606///
25607/// For a full list of header configuration options, please see the [corresponding section of
25608/// in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).
25609///
25610/// Header configuration, which determines default properties for column
25611/// [headers](https://vega.github.io/vega-lite/docs/header.html).
25612///
25613/// For a full list of header configuration options, please see the [corresponding section of
25614/// in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).
25615///
25616/// Header configuration, which determines default properties for non-row/column facet
25617/// [headers](https://vega.github.io/vega-lite/docs/header.html).
25618///
25619/// For a full list of header configuration options, please see the [corresponding section of
25620/// in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).
25621///
25622/// Header configuration, which determines default properties for row
25623/// [headers](https://vega.github.io/vega-lite/docs/header.html).
25624///
25625/// For a full list of header configuration options, please see the [corresponding section of
25626/// in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).
25627#[derive(Debug, Clone, Serialize, Deserialize)]
25628#[serde(rename_all = "camelCase")]
25629#[derive(Default, Builder)]
25630#[builder(setter(into, strip_option))]
25631pub struct HeaderConfig {
25632    /// When used with the default `"number"` and `"time"` format type, the text formatting
25633    /// pattern for labels of guides (axes, legends, headers) and text marks.
25634    ///
25635    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
25636    /// format pattern](https://github.com/d3/d3-format#locale_format).
25637    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
25638    /// pattern](https://github.com/d3/d3-time-format#locale_format).
25639    ///
25640    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
25641    /// more examples.
25642    ///
25643    /// When used with a [custom
25644    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
25645    /// value will be passed as `format` alongside `datum.value` to the registered function.
25646    ///
25647    /// __Default value:__  Derived from
25648    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
25649    /// number format and from
25650    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
25651    /// format.
25652    #[serde(skip_serializing_if = "Option::is_none")]
25653    #[builder(default)]
25654    pub format: Option<Format>,
25655    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
25656    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
25657    ///
25658    /// __Default value:__
25659    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
25660    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
25661    /// `timeUnit`.
25662    #[serde(skip_serializing_if = "Option::is_none")]
25663    #[builder(default)]
25664    pub format_type: Option<String>,
25665    /// Horizontal text alignment of header labels. One of `"left"`, `"center"`, or `"right"`.
25666    #[serde(skip_serializing_if = "Option::is_none")]
25667    #[builder(default)]
25668    pub label_align: Option<TitleAlignUnion>,
25669    /// The anchor position for placing the labels. One of `"start"`, `"middle"`, or `"end"`. For
25670    /// example, with a label orientation of top these anchor positions map to a left-, center-,
25671    /// or right-aligned label.
25672    #[serde(skip_serializing_if = "Option::is_none")]
25673    #[builder(default)]
25674    pub label_anchor: Option<TitleAnchorEnum>,
25675    /// The rotation angle of the header labels.
25676    ///
25677    /// __Default value:__ `0` for column header, `-90` for row header.
25678    #[serde(skip_serializing_if = "Option::is_none")]
25679    #[builder(default)]
25680    pub label_angle: Option<f64>,
25681    /// The vertical text baseline for the header labels. One of `"alphabetic"` (default),
25682    /// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
25683    /// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
25684    /// relative to the `titleLineHeight` rather than `titleFontSize` alone.
25685    #[serde(skip_serializing_if = "Option::is_none")]
25686    #[builder(default)]
25687    pub label_baseline: Option<TextBaseline>,
25688    /// The color of the header label, can be in hex color code or regular color name.
25689    #[serde(skip_serializing_if = "Option::is_none")]
25690    #[builder(default)]
25691    pub label_color: Option<Box<Color>>,
25692    /// [Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.
25693    ///
25694    /// __Note:__ The label text and value can be assessed via the `label` and `value` properties
25695    /// of the header's backing `datum` object.
25696    #[serde(skip_serializing_if = "Option::is_none")]
25697    #[builder(default)]
25698    pub label_expr: Option<String>,
25699    /// The font of the header label.
25700    #[serde(skip_serializing_if = "Option::is_none")]
25701    #[builder(default)]
25702    pub label_font: Option<Box<Color>>,
25703    /// The font size of the header label, in pixels.
25704    #[serde(skip_serializing_if = "Option::is_none")]
25705    #[builder(default)]
25706    pub label_font_size: Option<CornerRadiusUnion>,
25707    /// The font style of the header label.
25708    #[serde(skip_serializing_if = "Option::is_none")]
25709    #[builder(default)]
25710    pub label_font_style: Option<Box<Color>>,
25711    /// The font weight of the header label.
25712    #[serde(skip_serializing_if = "Option::is_none")]
25713    #[builder(default)]
25714    pub label_font_weight: Option<FontWeightUnion>,
25715    /// The maximum length of the header label in pixels. The text value will be automatically
25716    /// truncated if the rendered size exceeds the limit.
25717    ///
25718    /// __Default value:__ `0`, indicating no limit
25719    #[serde(skip_serializing_if = "Option::is_none")]
25720    #[builder(default)]
25721    pub label_limit: Option<CornerRadiusUnion>,
25722    /// Line height in pixels for multi-line header labels or title text with `"line-top"` or
25723    /// `"line-bottom"` baseline.
25724    #[serde(skip_serializing_if = "Option::is_none")]
25725    #[builder(default)]
25726    pub label_line_height: Option<CornerRadiusUnion>,
25727    /// The orientation of the header label. One of `"top"`, `"bottom"`, `"left"` or `"right"`.
25728    #[serde(skip_serializing_if = "Option::is_none")]
25729    #[builder(default)]
25730    pub label_orient: Option<Orient>,
25731    /// The padding, in pixel, between facet header's label and the plot.
25732    ///
25733    /// __Default value:__ `10`
25734    #[serde(skip_serializing_if = "Option::is_none")]
25735    #[builder(default)]
25736    pub label_padding: Option<CornerRadiusUnion>,
25737    /// A boolean flag indicating if labels should be included as part of the header.
25738    ///
25739    /// __Default value:__ `true`.
25740    #[serde(skip_serializing_if = "Option::is_none")]
25741    #[builder(default)]
25742    pub labels: Option<bool>,
25743    /// Shortcut for setting both labelOrient and titleOrient.
25744    #[serde(skip_serializing_if = "Option::is_none")]
25745    #[builder(default)]
25746    pub orient: Option<Orient>,
25747    /// Set to null to disable title for the axis, legend, or header.
25748    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
25749    #[builder(default)]
25750    pub title: RemovableValue<serde_json::Value>,
25751    /// Horizontal text alignment (to the anchor) of header titles.
25752    #[serde(skip_serializing_if = "Option::is_none")]
25753    #[builder(default)]
25754    pub title_align: Option<TitleAlignUnion>,
25755    /// The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For
25756    /// example, with an orientation of top these anchor positions map to a left-, center-, or
25757    /// right-aligned title.
25758    #[serde(skip_serializing_if = "Option::is_none")]
25759    #[builder(default)]
25760    pub title_anchor: Option<TitleAnchorEnum>,
25761    /// The rotation angle of the header title.
25762    ///
25763    /// __Default value:__ `0`.
25764    #[serde(skip_serializing_if = "Option::is_none")]
25765    #[builder(default)]
25766    pub title_angle: Option<f64>,
25767    /// The vertical text baseline for the header title. One of `"alphabetic"` (default),
25768    /// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
25769    /// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
25770    /// relative to the `titleLineHeight` rather than `titleFontSize` alone.
25771    ///
25772    /// __Default value:__ `"middle"`
25773    #[serde(skip_serializing_if = "Option::is_none")]
25774    #[builder(default)]
25775    pub title_baseline: Option<TextBaseline>,
25776    /// Color of the header title, can be in hex color code or regular color name.
25777    #[serde(skip_serializing_if = "Option::is_none")]
25778    #[builder(default)]
25779    pub title_color: Option<Box<Color>>,
25780    /// Font of the header title. (e.g., `"Helvetica Neue"`).
25781    #[serde(skip_serializing_if = "Option::is_none")]
25782    #[builder(default)]
25783    pub title_font: Option<Box<Color>>,
25784    /// Font size of the header title.
25785    #[serde(skip_serializing_if = "Option::is_none")]
25786    #[builder(default)]
25787    pub title_font_size: Option<CornerRadiusUnion>,
25788    /// The font style of the header title.
25789    #[serde(skip_serializing_if = "Option::is_none")]
25790    #[builder(default)]
25791    pub title_font_style: Option<Box<Color>>,
25792    /// Font weight of the header title. This can be either a string (e.g `"bold"`, `"normal"`)
25793    /// or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` =
25794    /// `700`).
25795    #[serde(skip_serializing_if = "Option::is_none")]
25796    #[builder(default)]
25797    pub title_font_weight: Option<FontWeightUnion>,
25798    /// The maximum length of the header title in pixels. The text value will be automatically
25799    /// truncated if the rendered size exceeds the limit.
25800    ///
25801    /// __Default value:__ `0`, indicating no limit
25802    #[serde(skip_serializing_if = "Option::is_none")]
25803    #[builder(default)]
25804    pub title_limit: Option<CornerRadiusUnion>,
25805    /// Line height in pixels for multi-line header title text or title text with `"line-top"` or
25806    /// `"line-bottom"` baseline.
25807    #[serde(skip_serializing_if = "Option::is_none")]
25808    #[builder(default)]
25809    pub title_line_height: Option<CornerRadiusUnion>,
25810    /// The orientation of the header title. One of `"top"`, `"bottom"`, `"left"` or `"right"`.
25811    #[serde(skip_serializing_if = "Option::is_none")]
25812    #[builder(default)]
25813    pub title_orient: Option<Orient>,
25814    /// The padding, in pixel, between facet header's title and the label.
25815    ///
25816    /// __Default value:__ `10`
25817    #[serde(skip_serializing_if = "Option::is_none")]
25818    #[builder(default)]
25819    pub title_padding: Option<CornerRadiusUnion>,
25820}
25821
25822/// Legend configuration, which determines default properties for all
25823/// [legends](https://vega.github.io/vega-lite/docs/legend.html). For a full list of legend
25824/// configuration options, please see the [corresponding section of in the legend
25825/// documentation](https://vega.github.io/vega-lite/docs/legend.html#config).
25826#[derive(Debug, Clone, Serialize, Deserialize)]
25827#[serde(rename_all = "camelCase")]
25828#[derive(Default, Builder)]
25829#[builder(setter(into, strip_option))]
25830pub struct LegendConfig {
25831    #[serde(skip_serializing_if = "Option::is_none")]
25832    #[builder(default)]
25833    pub aria: Option<Aria>,
25834    #[serde(skip_serializing_if = "Option::is_none")]
25835    #[builder(default)]
25836    pub clip_height: Option<CornerRadiusUnion>,
25837    #[serde(skip_serializing_if = "Option::is_none")]
25838    #[builder(default)]
25839    pub column_padding: Option<CornerRadiusUnion>,
25840    #[serde(skip_serializing_if = "Option::is_none")]
25841    #[builder(default)]
25842    pub columns: Option<CornerRadiusUnion>,
25843    #[serde(skip_serializing_if = "Option::is_none")]
25844    #[builder(default)]
25845    pub corner_radius: Option<CornerRadiusUnion>,
25846    #[serde(skip_serializing_if = "Option::is_none")]
25847    #[builder(default)]
25848    pub description: Option<Box<Color>>,
25849    /// The direction of the legend, one of `"vertical"` or `"horizontal"`.
25850    ///
25851    /// __Default value:__
25852    /// - For top-/bottom-`orient`ed legends, `"horizontal"`
25853    /// - For left-/right-`orient`ed legends, `"vertical"`
25854    /// - For top/bottom-left/right-`orient`ed legends, `"horizontal"` for gradient legends and
25855    /// `"vertical"` for symbol legends.
25856    #[serde(skip_serializing_if = "Option::is_none")]
25857    #[builder(default)]
25858    pub direction: Option<Orientation>,
25859    /// Disable legend by default
25860    #[serde(skip_serializing_if = "Option::is_none")]
25861    #[builder(default)]
25862    pub disable: Option<bool>,
25863    #[serde(skip_serializing_if = "Option::is_none")]
25864    #[builder(default)]
25865    pub fill_color: Option<Box<Color>>,
25866    #[serde(skip_serializing_if = "Option::is_none")]
25867    #[builder(default)]
25868    pub gradient_direction: Option<Direction>,
25869    /// Max legend length for a horizontal gradient when `config.legend.gradientLength` is
25870    /// undefined.
25871    ///
25872    /// __Default value:__ `200`
25873    #[serde(skip_serializing_if = "Option::is_none")]
25874    #[builder(default)]
25875    pub gradient_horizontal_max_length: Option<f64>,
25876    /// Min legend length for a horizontal gradient when `config.legend.gradientLength` is
25877    /// undefined.
25878    ///
25879    /// __Default value:__ `100`
25880    #[serde(skip_serializing_if = "Option::is_none")]
25881    #[builder(default)]
25882    pub gradient_horizontal_min_length: Option<f64>,
25883    #[serde(skip_serializing_if = "Option::is_none")]
25884    #[builder(default)]
25885    pub gradient_label_limit: Option<CornerRadiusUnion>,
25886    #[serde(skip_serializing_if = "Option::is_none")]
25887    #[builder(default)]
25888    pub gradient_label_offset: Option<CornerRadiusUnion>,
25889    #[serde(skip_serializing_if = "Option::is_none")]
25890    #[builder(default)]
25891    pub gradient_length: Option<FontSize>,
25892    #[serde(skip_serializing_if = "Option::is_none")]
25893    #[builder(default)]
25894    pub gradient_opacity: Option<CornerRadiusUnion>,
25895    #[serde(skip_serializing_if = "Option::is_none")]
25896    #[builder(default)]
25897    pub gradient_stroke_color: Option<Box<Color>>,
25898    #[serde(skip_serializing_if = "Option::is_none")]
25899    #[builder(default)]
25900    pub gradient_stroke_width: Option<FontSize>,
25901    #[serde(skip_serializing_if = "Option::is_none")]
25902    #[builder(default)]
25903    pub gradient_thickness: Option<FontSize>,
25904    /// Max legend length for a vertical gradient when `config.legend.gradientLength` is
25905    /// undefined.
25906    ///
25907    /// __Default value:__ `200`
25908    #[serde(skip_serializing_if = "Option::is_none")]
25909    #[builder(default)]
25910    pub gradient_vertical_max_length: Option<f64>,
25911    /// Min legend length for a vertical gradient when `config.legend.gradientLength` is
25912    /// undefined.
25913    ///
25914    /// __Default value:__ `100`
25915    #[serde(skip_serializing_if = "Option::is_none")]
25916    #[builder(default)]
25917    pub gradient_vertical_min_length: Option<f64>,
25918    #[serde(skip_serializing_if = "Option::is_none")]
25919    #[builder(default)]
25920    pub grid_align: Option<GridAlign>,
25921    #[serde(skip_serializing_if = "Option::is_none")]
25922    #[builder(default)]
25923    pub label_align: Option<TitleAlignUnion>,
25924    #[serde(skip_serializing_if = "Option::is_none")]
25925    #[builder(default)]
25926    pub label_baseline: Option<TextBaseline>,
25927    #[serde(skip_serializing_if = "Option::is_none")]
25928    #[builder(default)]
25929    pub label_color: Option<Box<Color>>,
25930    #[serde(skip_serializing_if = "Option::is_none")]
25931    #[builder(default)]
25932    pub label_font: Option<Box<Color>>,
25933    #[serde(skip_serializing_if = "Option::is_none")]
25934    #[builder(default)]
25935    pub label_font_size: Option<FontSize>,
25936    #[serde(skip_serializing_if = "Option::is_none")]
25937    #[builder(default)]
25938    pub label_font_style: Option<Box<Color>>,
25939    #[serde(skip_serializing_if = "Option::is_none")]
25940    #[builder(default)]
25941    pub label_font_weight: Option<FontWeightUnion>,
25942    #[serde(skip_serializing_if = "Option::is_none")]
25943    #[builder(default)]
25944    pub label_limit: Option<CornerRadiusUnion>,
25945    #[serde(skip_serializing_if = "Option::is_none")]
25946    #[builder(default)]
25947    pub label_offset: Option<FontSize>,
25948    #[serde(skip_serializing_if = "Option::is_none")]
25949    #[builder(default)]
25950    pub label_opacity: Option<CornerRadiusUnion>,
25951    /// The strategy to use for resolving overlap of labels in gradient legends. If `false`, no
25952    /// overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
25953    /// every other label is used. If set to `"greedy"`, a linear scan of the labels is
25954    /// performed, removing any label that overlaps with the last visible label (this often works
25955    /// better for log-scaled axes).
25956    ///
25957    /// __Default value:__ `"greedy"` for `log scales otherwise `true`.
25958    #[serde(skip_serializing_if = "Option::is_none")]
25959    #[builder(default)]
25960    pub label_overlap: Option<LabelOverlapUnion>,
25961    #[serde(skip_serializing_if = "Option::is_none")]
25962    #[builder(default)]
25963    pub label_padding: Option<CornerRadiusUnion>,
25964    #[serde(skip_serializing_if = "Option::is_none")]
25965    #[builder(default)]
25966    pub label_separation: Option<CornerRadiusUnion>,
25967    #[serde(skip_serializing_if = "Option::is_none")]
25968    #[builder(default)]
25969    pub layout: Option<BackgroundExprRef>,
25970    #[serde(skip_serializing_if = "Option::is_none")]
25971    #[builder(default)]
25972    pub legend_x: Option<CornerRadiusUnion>,
25973    #[serde(skip_serializing_if = "Option::is_none")]
25974    #[builder(default)]
25975    pub legend_y: Option<CornerRadiusUnion>,
25976    #[serde(skip_serializing_if = "Option::is_none")]
25977    #[builder(default)]
25978    pub offset: Option<CornerRadiusUnion>,
25979    /// The orientation of the legend, which determines how the legend is positioned within the
25980    /// scene. One of `"left"`, `"right"`, `"top"`, `"bottom"`, `"top-left"`, `"top-right"`,
25981    /// `"bottom-left"`, `"bottom-right"`, `"none"`.
25982    ///
25983    /// __Default value:__ `"right"`
25984    #[serde(skip_serializing_if = "Option::is_none")]
25985    #[builder(default)]
25986    pub orient: Option<LegendOrient>,
25987    #[serde(skip_serializing_if = "Option::is_none")]
25988    #[builder(default)]
25989    pub padding: Option<CornerRadiusUnion>,
25990    #[serde(skip_serializing_if = "Option::is_none")]
25991    #[builder(default)]
25992    pub row_padding: Option<CornerRadiusUnion>,
25993    #[serde(skip_serializing_if = "Option::is_none")]
25994    #[builder(default)]
25995    pub stroke_color: Option<Box<Color>>,
25996    #[serde(skip_serializing_if = "Option::is_none")]
25997    #[builder(default)]
25998    pub stroke_dash: Option<StrokeDashUnion>,
25999    #[serde(skip_serializing_if = "Option::is_none")]
26000    #[builder(default)]
26001    pub stroke_width: Option<CornerRadiusUnion>,
26002    #[serde(skip_serializing_if = "Option::is_none")]
26003    #[builder(default)]
26004    pub symbol_base_fill_color: Option<Box<Color>>,
26005    #[serde(skip_serializing_if = "Option::is_none")]
26006    #[builder(default)]
26007    pub symbol_base_stroke_color: Option<Box<Color>>,
26008    #[serde(skip_serializing_if = "Option::is_none")]
26009    #[builder(default)]
26010    pub symbol_dash: Option<StrokeDashUnion>,
26011    #[serde(skip_serializing_if = "Option::is_none")]
26012    #[builder(default)]
26013    pub symbol_dash_offset: Option<CornerRadiusUnion>,
26014    #[serde(skip_serializing_if = "Option::is_none")]
26015    #[builder(default)]
26016    pub symbol_direction: Option<Direction>,
26017    #[serde(skip_serializing_if = "Option::is_none")]
26018    #[builder(default)]
26019    pub symbol_fill_color: Option<Box<Color>>,
26020    #[serde(skip_serializing_if = "Option::is_none")]
26021    #[builder(default)]
26022    pub symbol_limit: Option<CornerRadiusUnion>,
26023    #[serde(skip_serializing_if = "Option::is_none")]
26024    #[builder(default)]
26025    pub symbol_offset: Option<CornerRadiusUnion>,
26026    #[serde(skip_serializing_if = "Option::is_none")]
26027    #[builder(default)]
26028    pub symbol_opacity: Option<CornerRadiusUnion>,
26029    #[serde(skip_serializing_if = "Option::is_none")]
26030    #[builder(default)]
26031    pub symbol_size: Option<FontSize>,
26032    #[serde(skip_serializing_if = "Option::is_none")]
26033    #[builder(default)]
26034    pub symbol_stroke_color: Option<Box<Color>>,
26035    #[serde(skip_serializing_if = "Option::is_none")]
26036    #[builder(default)]
26037    pub symbol_stroke_width: Option<FontSize>,
26038    #[serde(skip_serializing_if = "Option::is_none")]
26039    #[builder(default)]
26040    pub symbol_type: Option<Box<Color>>,
26041    #[serde(skip_serializing_if = "Option::is_none")]
26042    #[builder(default)]
26043    pub tick_count: Option<TickCount>,
26044    /// Set to null to disable title for the axis, legend, or header.
26045    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
26046    #[builder(default)]
26047    pub title: RemovableValue<serde_json::Value>,
26048    #[serde(skip_serializing_if = "Option::is_none")]
26049    #[builder(default)]
26050    pub title_align: Option<TitleAlignUnion>,
26051    #[serde(skip_serializing_if = "Option::is_none")]
26052    #[builder(default)]
26053    pub title_anchor: Option<TitleAnchorUnion>,
26054    #[serde(skip_serializing_if = "Option::is_none")]
26055    #[builder(default)]
26056    pub title_baseline: Option<TextBaseline>,
26057    #[serde(skip_serializing_if = "Option::is_none")]
26058    #[builder(default)]
26059    pub title_color: Option<Box<Color>>,
26060    #[serde(skip_serializing_if = "Option::is_none")]
26061    #[builder(default)]
26062    pub title_font: Option<Box<Color>>,
26063    #[serde(skip_serializing_if = "Option::is_none")]
26064    #[builder(default)]
26065    pub title_font_size: Option<CornerRadiusUnion>,
26066    #[serde(skip_serializing_if = "Option::is_none")]
26067    #[builder(default)]
26068    pub title_font_style: Option<Box<Color>>,
26069    #[serde(skip_serializing_if = "Option::is_none")]
26070    #[builder(default)]
26071    pub title_font_weight: Option<FontWeightUnion>,
26072    #[serde(skip_serializing_if = "Option::is_none")]
26073    #[builder(default)]
26074    pub title_limit: Option<FontSize>,
26075    #[serde(skip_serializing_if = "Option::is_none")]
26076    #[builder(default)]
26077    pub title_line_height: Option<CornerRadiusUnion>,
26078    #[serde(skip_serializing_if = "Option::is_none")]
26079    #[builder(default)]
26080    pub title_opacity: Option<CornerRadiusUnion>,
26081    #[serde(skip_serializing_if = "Option::is_none")]
26082    #[builder(default)]
26083    pub title_orient: Option<TitleOrientUnion>,
26084    #[serde(skip_serializing_if = "Option::is_none")]
26085    #[builder(default)]
26086    pub title_padding: Option<CornerRadiusUnion>,
26087    /// The opacity of unselected legend entries.
26088    ///
26089    /// __Default value:__ 0.35.
26090    #[serde(skip_serializing_if = "Option::is_none")]
26091    #[builder(default)]
26092    pub unselected_opacity: Option<f64>,
26093    #[serde(skip_serializing_if = "Option::is_none")]
26094    #[builder(default)]
26095    pub zindex: Option<FontSize>,
26096}
26097
26098#[derive(Debug, Clone, Serialize, Deserialize)]
26099#[serde(untagged)]
26100#[derive(From)]
26101pub enum Direction {
26102    BackgroundExprRef(BackgroundExprRef),
26103    Enum(Orientation),
26104}
26105
26106/// Line-Specific Config
26107///
26108/// Trail-Specific Config
26109#[derive(Debug, Clone, Serialize, Deserialize)]
26110#[serde(rename_all = "camelCase")]
26111#[derive(Default, Builder)]
26112#[builder(setter(into, strip_option))]
26113pub struct LineConfig {
26114    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
26115    /// of `"left"`, `"right"`, `"center"`.
26116    ///
26117    /// __Note:__ Expression reference is *not* supported for range marks.
26118    #[serde(skip_serializing_if = "Option::is_none")]
26119    #[builder(default)]
26120    pub align: Option<TitleAlignUnion>,
26121    #[serde(skip_serializing_if = "Option::is_none")]
26122    #[builder(default)]
26123    pub angle: Option<Angle>,
26124    #[serde(skip_serializing_if = "Option::is_none")]
26125    #[builder(default)]
26126    pub aria: Option<Aria>,
26127    #[serde(skip_serializing_if = "Option::is_none")]
26128    #[builder(default)]
26129    pub aria_role: Option<Box<Color>>,
26130    #[serde(skip_serializing_if = "Option::is_none")]
26131    #[builder(default)]
26132    pub aria_role_description: Option<Box<Color>>,
26133    #[serde(skip_serializing_if = "Option::is_none")]
26134    #[builder(default)]
26135    pub aspect: Option<Aria>,
26136    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
26137    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
26138    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
26139    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
26140    /// rather than `fontSize` alone.
26141    ///
26142    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
26143    /// `"bottom"`.
26144    ///
26145    /// __Note:__ Expression reference is *not* supported for range marks.
26146    #[serde(skip_serializing_if = "Option::is_none")]
26147    #[builder(default)]
26148    pub baseline: Option<TextBaseline>,
26149    #[serde(skip_serializing_if = "Option::is_none")]
26150    #[builder(default)]
26151    pub blend: Option<BlendUnion>,
26152    /// Default color.
26153    ///
26154    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
26155    ///
26156    /// __Note:__
26157    /// - This property cannot be used in a [style
26158    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
26159    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
26160    /// override `color`.
26161    #[serde(skip_serializing_if = "Option::is_none")]
26162    #[builder(default)]
26163    pub color: Option<MarkConfigColor>,
26164    #[serde(skip_serializing_if = "Option::is_none")]
26165    #[builder(default)]
26166    pub corner_radius: Option<CornerRadiusUnion>,
26167    #[serde(skip_serializing_if = "Option::is_none")]
26168    #[builder(default)]
26169    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
26170    #[serde(skip_serializing_if = "Option::is_none")]
26171    #[builder(default)]
26172    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
26173    #[serde(skip_serializing_if = "Option::is_none")]
26174    #[builder(default)]
26175    pub corner_radius_top_left: Option<CornerRadiusUnion>,
26176    #[serde(skip_serializing_if = "Option::is_none")]
26177    #[builder(default)]
26178    pub corner_radius_top_right: Option<CornerRadiusUnion>,
26179    #[serde(skip_serializing_if = "Option::is_none")]
26180    #[builder(default)]
26181    pub cursor: Option<CursorUnion>,
26182    #[serde(skip_serializing_if = "Option::is_none")]
26183    #[builder(default)]
26184    pub description: Option<Box<Color>>,
26185    #[serde(skip_serializing_if = "Option::is_none")]
26186    #[builder(default)]
26187    pub dir: Option<Dir>,
26188    #[serde(skip_serializing_if = "Option::is_none")]
26189    #[builder(default)]
26190    pub dx: Option<CornerRadiusUnion>,
26191    #[serde(skip_serializing_if = "Option::is_none")]
26192    #[builder(default)]
26193    pub dy: Option<CornerRadiusUnion>,
26194    #[serde(skip_serializing_if = "Option::is_none")]
26195    #[builder(default)]
26196    pub ellipsis: Option<Box<Color>>,
26197    #[serde(skip_serializing_if = "Option::is_none")]
26198    #[builder(default)]
26199    pub end_angle: Option<CornerRadiusUnion>,
26200    /// Default fill color. This property has higher precedence than `config.color`. Set to
26201    /// `null` to remove fill.
26202    ///
26203    /// __Default value:__ (None)
26204    #[serde(skip_serializing_if = "Option::is_none")]
26205    #[builder(default)]
26206    pub fill: Option<MarkConfigFill>,
26207    /// Whether the mark's color should be used as fill color instead of stroke color.
26208    ///
26209    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
26210    /// `geoshape` marks for
26211    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
26212    /// otherwise, `true`.
26213    ///
26214    /// __Note:__ This property cannot be used in a [style
26215    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
26216    #[serde(skip_serializing_if = "Option::is_none")]
26217    #[builder(default)]
26218    pub filled: Option<bool>,
26219    #[serde(skip_serializing_if = "Option::is_none")]
26220    #[builder(default)]
26221    pub fill_opacity: Option<Opacity>,
26222    #[serde(skip_serializing_if = "Option::is_none")]
26223    #[builder(default)]
26224    pub font: Option<Box<Color>>,
26225    #[serde(skip_serializing_if = "Option::is_none")]
26226    #[builder(default)]
26227    pub font_size: Option<FontSize>,
26228    #[serde(skip_serializing_if = "Option::is_none")]
26229    #[builder(default)]
26230    pub font_style: Option<Box<Color>>,
26231    #[serde(skip_serializing_if = "Option::is_none")]
26232    #[builder(default)]
26233    pub font_weight: Option<FontWeightUnion>,
26234    #[serde(skip_serializing_if = "Option::is_none")]
26235    #[builder(default)]
26236    pub height: Option<CornerRadiusUnion>,
26237    #[serde(skip_serializing_if = "Option::is_none")]
26238    #[builder(default)]
26239    pub href: Option<Box<Color>>,
26240    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
26241    ///
26242    /// __Default value:__ `0`
26243    #[serde(skip_serializing_if = "Option::is_none")]
26244    #[builder(default)]
26245    pub inner_radius: Option<CornerRadiusUnion>,
26246    #[serde(skip_serializing_if = "Option::is_none")]
26247    #[builder(default)]
26248    pub interpolate: Option<MarkConfigInterpolate>,
26249    /// Invalid data mode, which defines how the marks and corresponding scales should represent
26250    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
26251    /// invalid values).
26252    ///
26253    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
26254    /// *scales*. For path marks (for line, area, trail), this option will create paths that
26255    /// connect valid points, as if the data rows with invalid values do not exist.
26256    ///
26257    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
26258    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
26259    /// *exclude* these filtered data points.
26260    ///
26261    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
26262    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
26263    /// data points (for both path and non-path marks).
26264    ///
26265    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
26266    /// will use the output for invalid values defined in `config.scale.invalid` or, if
26267    /// unspecified, by default invalid values will produce the same visual values as zero (if
26268    /// the scale includes zero) or the minimum value (if the scale does not include zero).
26269    ///
26270    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
26271    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
26272    /// non-path marks.
26273    ///
26274    /// __Note__: If any channel's scale has an output for invalid values defined in
26275    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
26276    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
26277    /// be filtered and will not cause path breaks.
26278    #[serde(skip_serializing_if = "Option::is_none")]
26279    #[builder(default)]
26280    pub invalid: Option<MarkInvalidDataMode>,
26281    #[serde(skip_serializing_if = "Option::is_none")]
26282    #[builder(default)]
26283    pub limit: Option<CornerRadiusUnion>,
26284    #[serde(skip_serializing_if = "Option::is_none")]
26285    #[builder(default)]
26286    pub line_break: Option<Box<Color>>,
26287    #[serde(skip_serializing_if = "Option::is_none")]
26288    #[builder(default)]
26289    pub line_height: Option<CornerRadiusUnion>,
26290    /// The overall opacity (value between [0,1]).
26291    ///
26292    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
26293    /// `square` marks or layered `bar` charts and `1` otherwise.
26294    #[serde(skip_serializing_if = "Option::is_none")]
26295    #[builder(default)]
26296    pub opacity: Option<CornerRadiusUnion>,
26297    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
26298    /// the lines use the original order in the data sources.
26299    #[serde(skip_serializing_if = "Option::is_none")]
26300    #[builder(default)]
26301    pub order: Option<bool>,
26302    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
26303    /// horizontal (default) or vertical.
26304    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
26305    /// applied to x or y dimension.
26306    /// - For area, this property determines the orient property of the Vega output.
26307    /// - For line and trail marks, this property determines the sort order of the points in the
26308    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
26309    /// determined by the orientation of the stack; therefore explicitly specified value will be
26310    /// ignored.
26311    #[serde(skip_serializing_if = "Option::is_none")]
26312    #[builder(default)]
26313    pub orient: Option<Orientation>,
26314    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
26315    ///
26316    /// __Default value:__ `0`
26317    #[serde(skip_serializing_if = "Option::is_none")]
26318    #[builder(default)]
26319    pub outer_radius: Option<CornerRadiusUnion>,
26320    #[serde(skip_serializing_if = "Option::is_none")]
26321    #[builder(default)]
26322    pub pad_angle: Option<CornerRadiusUnion>,
26323    /// A flag for overlaying points on top of line or area marks, or an object defining the
26324    /// properties of the overlayed points.
26325    ///
26326    /// - If this property is `"transparent"`, transparent points will be used (for enhancing
26327    /// tooltips and selections).
26328    ///
26329    /// - If this property is an empty object (`{}`) or `true`, filled points with default
26330    /// properties will be used.
26331    ///
26332    /// - If this property is `false`, no points would be automatically added to line or area
26333    /// marks.
26334    ///
26335    /// __Default value:__ `false`.
26336    #[serde(skip_serializing_if = "Option::is_none")]
26337    #[builder(default)]
26338    pub point: Option<PointUnion>,
26339    /// For arc mark, the primary (outer) radius in pixels.
26340    ///
26341    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
26342    /// determined by the `x` and `y` properties.
26343    ///
26344    /// __Default value:__ `min(plot_width, plot_height)/2`
26345    #[serde(skip_serializing_if = "Option::is_none")]
26346    #[builder(default)]
26347    pub radius: Option<CornerRadiusUnion>,
26348    /// The secondary (inner) radius in pixels of arc marks.
26349    ///
26350    /// __Default value:__ `0`
26351    #[serde(skip_serializing_if = "Option::is_none")]
26352    #[builder(default)]
26353    pub radius2: Option<CornerRadiusUnion>,
26354    #[serde(skip_serializing_if = "Option::is_none")]
26355    #[builder(default)]
26356    pub shape: Option<Box<Color>>,
26357    /// Default size for marks.
26358    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
26359    /// this value sets the area of the symbol; the side lengths will increase with the square
26360    /// root of this value.
26361    /// - For `bar`, this represents the band size of the bar, in pixels.
26362    /// - For `text`, this represents the font size, in pixels.
26363    ///
26364    /// __Default value:__
26365    /// - `30` for point, circle, square marks; width/height's `step`
26366    /// - `2` for bar marks with discrete dimensions;
26367    /// - `5` for bar marks with continuous dimensions;
26368    /// - `11` for text marks.
26369    #[serde(skip_serializing_if = "Option::is_none")]
26370    #[builder(default)]
26371    pub size: Option<CornerRadiusUnion>,
26372    #[serde(skip_serializing_if = "Option::is_none")]
26373    #[builder(default)]
26374    pub smooth: Option<Aria>,
26375    #[serde(skip_serializing_if = "Option::is_none")]
26376    #[builder(default)]
26377    pub start_angle: Option<CornerRadiusUnion>,
26378    /// Default stroke color. This property has higher precedence than `config.color`. Set to
26379    /// `null` to remove stroke.
26380    ///
26381    /// __Default value:__ (None)
26382    #[serde(skip_serializing_if = "Option::is_none")]
26383    #[builder(default)]
26384    pub stroke: Option<MarkConfigFill>,
26385    #[serde(skip_serializing_if = "Option::is_none")]
26386    #[builder(default)]
26387    pub stroke_cap: Option<Cap>,
26388    #[serde(skip_serializing_if = "Option::is_none")]
26389    #[builder(default)]
26390    pub stroke_dash: Option<StrokeDashUnion>,
26391    #[serde(skip_serializing_if = "Option::is_none")]
26392    #[builder(default)]
26393    pub stroke_dash_offset: Option<CornerRadiusUnion>,
26394    #[serde(skip_serializing_if = "Option::is_none")]
26395    #[builder(default)]
26396    pub stroke_join: Option<StrokeJoinUnion>,
26397    #[serde(skip_serializing_if = "Option::is_none")]
26398    #[builder(default)]
26399    pub stroke_miter_limit: Option<CornerRadiusUnion>,
26400    #[serde(skip_serializing_if = "Option::is_none")]
26401    #[builder(default)]
26402    pub stroke_offset: Option<CornerRadiusUnion>,
26403    #[serde(skip_serializing_if = "Option::is_none")]
26404    #[builder(default)]
26405    pub stroke_opacity: Option<Opacity>,
26406    #[serde(skip_serializing_if = "Option::is_none")]
26407    #[builder(default)]
26408    pub stroke_width: Option<FontSize>,
26409    #[serde(skip_serializing_if = "Option::is_none")]
26410    #[builder(default)]
26411    pub tension: Option<CornerRadiusUnion>,
26412    #[serde(skip_serializing_if = "Option::is_none")]
26413    #[builder(default)]
26414    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
26415    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
26416    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
26417    /// clockwise.)
26418    ///
26419    /// - For text marks, polar coordinate angle in radians.
26420    #[serde(skip_serializing_if = "Option::is_none")]
26421    #[builder(default)]
26422    pub theta: Option<CornerRadiusUnion>,
26423    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
26424    /// values proceed clockwise.
26425    #[serde(skip_serializing_if = "Option::is_none")]
26426    #[builder(default)]
26427    pub theta2: Option<CornerRadiusUnion>,
26428    #[serde(skip_serializing_if = "Option::is_none")]
26429    #[builder(default)]
26430    pub time: Option<CornerRadiusUnion>,
26431    /// Default relative band position for a time unit. If set to `0`, the marks will be
26432    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
26433    /// be positioned in the middle of the time unit band step.
26434    #[serde(skip_serializing_if = "Option::is_none")]
26435    #[builder(default)]
26436    pub time_unit_band_position: Option<f64>,
26437    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
26438    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
26439    /// half of the time unit band step.
26440    #[serde(skip_serializing_if = "Option::is_none")]
26441    #[builder(default)]
26442    pub time_unit_band_size: Option<f64>,
26443    /// The tooltip text string to show upon mouse hover or an object defining which fields
26444    /// should the tooltip be derived from.
26445    ///
26446    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
26447    /// will be used.
26448    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
26449    /// data point will be used.
26450    /// - If set to `null` or `false`, then no tooltip will be used.
26451    ///
26452    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
26453    /// a detailed discussion about tooltip  in Vega-Lite.
26454    ///
26455    /// __Default value:__ `null`
26456    #[serde(skip_serializing_if = "Option::is_none")]
26457    #[builder(default)]
26458    pub tooltip: Option<OverlayMarkDefTooltip>,
26459    #[serde(skip_serializing_if = "Option::is_none")]
26460    #[builder(default)]
26461    pub url: Option<Box<Color>>,
26462    #[serde(skip_serializing_if = "Option::is_none")]
26463    #[builder(default)]
26464    pub width: Option<CornerRadiusUnion>,
26465    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
26466    /// `x2` or `width`.
26467    ///
26468    /// The `value` of this channel can be a number or a string `"width"` for the width of the
26469    /// plot.
26470    #[serde(skip_serializing_if = "Option::is_none")]
26471    #[builder(default)]
26472    pub x: Option<XUnion>,
26473    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
26474    ///
26475    /// The `value` of this channel can be a number or a string `"width"` for the width of the
26476    /// plot.
26477    #[serde(skip_serializing_if = "Option::is_none")]
26478    #[builder(default)]
26479    pub x2: Option<XUnion>,
26480    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
26481    /// `y2` or `height`.
26482    ///
26483    /// The `value` of this channel can be a number or a string `"height"` for the height of the
26484    /// plot.
26485    #[serde(skip_serializing_if = "Option::is_none")]
26486    #[builder(default)]
26487    pub y: Option<YUnion>,
26488    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
26489    ///
26490    /// The `value` of this channel can be a number or a string `"height"` for the height of the
26491    /// plot.
26492    #[serde(skip_serializing_if = "Option::is_none")]
26493    #[builder(default)]
26494    pub y2: Option<YUnion>,
26495}
26496
26497/// Locale definitions for string parsing and formatting of number and date values. The
26498/// locale object should contain `number` and/or `time` properties with [locale
26499/// definitions](https://vega.github.io/vega/docs/api/locale/). Locale definitions provided
26500/// in the config block may be overridden by the View constructor locale option.
26501#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
26502#[builder(setter(into, strip_option))]
26503pub struct Locale {
26504    #[serde(skip_serializing_if = "Option::is_none")]
26505    #[builder(default)]
26506    pub number: Option<NumberLocale>,
26507    #[serde(skip_serializing_if = "Option::is_none")]
26508    #[builder(default)]
26509    pub time: Option<TimeLocale>,
26510}
26511
26512/// Locale definition for formatting numbers.
26513#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
26514#[builder(setter(into, strip_option))]
26515pub struct NumberLocale {
26516    /// The currency prefix and suffix (e.g., ["$", ""]).
26517    pub currency: Vec<String>,
26518    /// The decimal point (e.g., ".").
26519    #[serde(skip_serializing_if = "Option::is_none")]
26520    #[builder(default)]
26521    pub decimal: Option<String>,
26522    /// The array of group sizes (e.g., [3]), cycled as needed.
26523    pub grouping: Vec<f64>,
26524    /// The minus sign (defaults to hyphen-minus, "-").
26525    #[serde(skip_serializing_if = "Option::is_none")]
26526    #[builder(default)]
26527    pub minus: Option<String>,
26528    /// The not-a-number value (defaults to "NaN").
26529    #[serde(skip_serializing_if = "Option::is_none")]
26530    #[builder(default)]
26531    pub nan: Option<String>,
26532    /// An array of ten strings to replace the numerals 0-9.
26533    #[serde(skip_serializing_if = "Option::is_none")]
26534    #[builder(default)]
26535    pub numerals: Option<Vec<String>>,
26536    /// The percent sign (defaults to "%").
26537    #[serde(skip_serializing_if = "Option::is_none")]
26538    #[builder(default)]
26539    pub percent: Option<String>,
26540    /// The group separator (e.g., ",").
26541    #[serde(skip_serializing_if = "Option::is_none")]
26542    #[builder(default)]
26543    pub thousands: Option<String>,
26544}
26545
26546/// Locale definition for formatting dates and times.
26547#[derive(Debug, Clone, Serialize, Deserialize)]
26548#[serde(rename_all = "camelCase")]
26549#[derive(Default, Builder)]
26550#[builder(setter(into, strip_option))]
26551pub struct TimeLocale {
26552    /// The date (%x) format specifier (e.g., "%m/%d/%Y").
26553    #[serde(skip_serializing_if = "Option::is_none")]
26554    #[builder(default)]
26555    pub date: Option<String>,
26556    /// The date and time (%c) format specifier (e.g., "%a %b %e %X %Y").
26557    #[serde(skip_serializing_if = "Option::is_none")]
26558    #[builder(default)]
26559    pub date_time: Option<String>,
26560    /// The full names of the weekdays, starting with Sunday.
26561    pub days: Vec<String>,
26562    /// The full names of the months (starting with January).
26563    pub months: Vec<String>,
26564    /// The A.M. and P.M. equivalents (e.g., ["AM", "PM"]).
26565    pub periods: Vec<String>,
26566    /// The abbreviated names of the weekdays, starting with Sunday.
26567    pub short_days: Vec<String>,
26568    /// The abbreviated names of the months (starting with January).
26569    pub short_months: Vec<String>,
26570    /// The time (%X) format specifier (e.g., "%H:%M:%S").
26571    #[serde(skip_serializing_if = "Option::is_none")]
26572    #[builder(default)]
26573    pub time: Option<String>,
26574}
26575
26576/// The default visualization padding, in pixels, from the edge of the visualization canvas
26577/// to the data rectangle. If a number, specifies padding for all sides. If an object, the
26578/// value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify
26579/// padding for each side of the visualization.
26580///
26581/// __Default value__: `5`
26582#[derive(Debug, Clone, Serialize, Deserialize)]
26583#[serde(untagged)]
26584#[derive(From)]
26585pub enum Padding {
26586    Double(f64),
26587    MagentaExprRef(MagentaExprRef),
26588}
26589
26590/// An expression for an array of raw values that, if non-null, directly overrides the
26591/// _domain_ property. This is useful for supporting interactions such as panning or zooming
26592/// a scale. The scale may be initially determined using a data-driven domain, then modified
26593/// in response to user input by setting the rawDomain value.
26594#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
26595#[builder(setter(into, strip_option))]
26596pub struct MagentaExprRef {
26597    #[serde(skip_serializing_if = "Option::is_none")]
26598    #[builder(default)]
26599    pub bottom: Option<f64>,
26600    #[serde(skip_serializing_if = "Option::is_none")]
26601    #[builder(default)]
26602    pub left: Option<f64>,
26603    #[serde(skip_serializing_if = "Option::is_none")]
26604    #[builder(default)]
26605    pub right: Option<f64>,
26606    #[serde(skip_serializing_if = "Option::is_none")]
26607    #[builder(default)]
26608    pub top: Option<f64>,
26609    /// Vega expression (which can refer to Vega-Lite parameters).
26610    #[serde(skip_serializing_if = "Option::is_none")]
26611    #[builder(default)]
26612    pub expr: Option<String>,
26613}
26614
26615#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
26616#[builder(setter(into, strip_option))]
26617pub struct TopLevelParameter {
26618    /// Binds the parameter to an external input element such as a slider, selection list or
26619    /// radio button group.
26620    ///
26621    /// When set, a selection is populated by input elements (also known as dynamic query
26622    /// widgets) or by interacting with the corresponding legend. Direct manipulation interaction
26623    /// is disabled by default; to re-enable it, set the selection's
26624    /// [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties)
26625    /// property.
26626    ///
26627    /// Legend bindings are restricted to selections that only specify a single field or
26628    /// encoding.
26629    ///
26630    /// Query widget binding takes the form of Vega's [input element binding
26631    /// definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between
26632    /// projected field/encodings and binding definitions.
26633    ///
26634    /// __See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.
26635    #[serde(skip_serializing_if = "Option::is_none")]
26636    #[builder(default)]
26637    pub bind: Option<TopLevelParameterBind>,
26638    /// An expression for the value of the parameter. This expression may include other
26639    /// parameters, in which case the parameter will automatically update in response to upstream
26640    /// parameter changes.
26641    #[serde(skip_serializing_if = "Option::is_none")]
26642    #[builder(default)]
26643    pub expr: Option<String>,
26644    /// A unique name for the variable parameter. Parameter names should be valid JavaScript
26645    /// identifiers: they should contain only alphanumeric characters (or "$", or "_") and may
26646    /// not start with a digit. Reserved keywords that may not be used as parameter names are
26647    /// "datum", "event", "item", and "parent".
26648    ///
26649    /// Required. A unique name for the selection parameter. Selection names should be valid
26650    /// JavaScript identifiers: they should contain only alphanumeric characters (or "$", or "_")
26651    /// and may not start with a digit. Reserved keywords that may not be used as parameter names
26652    /// are "datum", "event", "item", and "parent".
26653    #[serde(skip_serializing_if = "Option::is_none")]
26654    #[builder(default)]
26655    pub name: Option<String>,
26656    /// A boolean flag (default `true`) indicating if the update expression should be
26657    /// automatically re-evaluated when any upstream signal dependencies update. If `false`, the
26658    /// update expression will not register any dependencies on other signals, even for
26659    /// initialization.
26660    ///
26661    /// __Default value:__ `true`
26662    #[serde(skip_serializing_if = "Option::is_none")]
26663    #[builder(default)]
26664    pub react: Option<bool>,
26665    /// The [initial value](http://vega.github.io/vega-lite/docs/value.html) of the parameter.
26666    ///
26667    /// __Default value:__ `undefined`
26668    ///
26669    /// Initialize the selection with a mapping between [projected channels or field
26670    /// names](https://vega.github.io/vega-lite/docs/selection.html#project) and initial values.
26671    ///
26672    /// __See also:__ [`init`](https://vega.github.io/vega-lite/docs/value.html) documentation.
26673    #[serde(skip_serializing_if = "Option::is_none")]
26674    #[builder(default)]
26675    pub value: Option<serde_json::Value>,
26676    /// Determines the default event processing and data query for the selection. Vega-Lite
26677    /// currently supports two selection types:
26678    ///
26679    /// - `"point"` -- to select multiple discrete data values; the first value is selected on
26680    /// `click` and additional values toggled on shift-click.
26681    /// - `"interval"` -- to select a continuous range of data values on `drag`.
26682    #[serde(skip_serializing_if = "Option::is_none")]
26683    #[builder(default)]
26684    pub select: Option<TopLevelParameterSelect>,
26685    /// By default, top-level selections are applied to every view in the visualization. If this
26686    /// property is specified, selections will only be applied to views with the given names.
26687    #[serde(skip_serializing_if = "Option::is_none")]
26688    #[builder(default)]
26689    pub views: Option<Vec<String>>,
26690}
26691
26692#[derive(Debug, Clone, Serialize, Deserialize)]
26693#[serde(untagged)]
26694#[derive(From)]
26695pub enum TopLevelParameterBind {
26696    Enum(LegendBinding),
26697    UnionMap(HashMap<String, BindingValue>),
26698}
26699
26700#[derive(Debug, Clone, Serialize, Deserialize)]
26701#[serde(untagged)]
26702#[derive(From)]
26703pub enum BindingValue {
26704    AnythingArray(Vec<Option<serde_json::Value>>),
26705    BindingBinding(BindingBinding),
26706    Double(f64),
26707    String(String),
26708}
26709
26710/// Binds the parameter to an external input element such as a slider, selection list or
26711/// radio button group.
26712#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
26713#[builder(setter(into, strip_option))]
26714pub struct BindingBinding {
26715    /// If defined, delays event handling until the specified milliseconds have elapsed since the
26716    /// last event was fired.
26717    #[serde(skip_serializing_if = "Option::is_none")]
26718    #[builder(default)]
26719    pub debounce: Option<f64>,
26720    /// An optional CSS selector string indicating the parent element to which the input element
26721    /// should be added. By default, all input elements are added within the parent container of
26722    /// the Vega view.
26723    ///
26724    /// An input element that exposes a _value_ property and supports the
26725    /// [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) interface, or
26726    /// a CSS selector string to such an element. When the element updates and dispatches an
26727    /// event, the _value_ property will be used as the new, bound signal value. When the signal
26728    /// updates independent of the element, the _value_ property will be set to the signal value
26729    /// and a new event will be dispatched on the element.
26730    #[serde(skip_serializing_if = "Option::is_none")]
26731    #[builder(default)]
26732    pub element: Option<ElementUnion>,
26733    /// The type of input element to use. The valid values are `"checkbox"`, `"radio"`,
26734    /// `"range"`, `"select"`, and any other legal [HTML form input
26735    /// type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).
26736    #[serde(skip_serializing_if = "Option::is_none")]
26737    #[builder(default)]
26738    pub input: Option<String>,
26739    /// By default, the signal name is used to label input elements. This `name` property can be
26740    /// used instead to specify a custom label for the bound signal.
26741    #[serde(skip_serializing_if = "Option::is_none")]
26742    #[builder(default)]
26743    pub name: Option<String>,
26744    /// An array of label strings to represent the `options` values. If unspecified, the
26745    /// `options` value will be coerced to a string and used as the label.
26746    #[serde(skip_serializing_if = "Option::is_none")]
26747    #[builder(default)]
26748    pub labels: Option<Vec<String>>,
26749    /// An array of options to select from.
26750    #[serde(skip_serializing_if = "Option::is_none")]
26751    #[builder(default)]
26752    pub options: Option<Vec<Option<serde_json::Value>>>,
26753    /// Sets the maximum slider value. Defaults to the larger of the signal value and `100`.
26754    #[serde(skip_serializing_if = "Option::is_none")]
26755    #[builder(default)]
26756    pub max: Option<f64>,
26757    /// Sets the minimum slider value. Defaults to the smaller of the signal value and `0`.
26758    #[serde(skip_serializing_if = "Option::is_none")]
26759    #[builder(default)]
26760    pub min: Option<f64>,
26761    /// Sets the minimum slider increment. If undefined, the step size will be automatically
26762    /// determined based on the `min` and `max` values.
26763    #[serde(skip_serializing_if = "Option::is_none")]
26764    #[builder(default)]
26765    pub step: Option<f64>,
26766    /// A hint for form autofill. See the [HTML autocomplete
26767    /// attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for
26768    /// additional information.
26769    #[serde(skip_serializing_if = "Option::is_none")]
26770    #[builder(default)]
26771    pub autocomplete: Option<String>,
26772    /// Text that appears in the form control when it has no value set.
26773    #[serde(skip_serializing_if = "Option::is_none")]
26774    #[builder(default)]
26775    pub placeholder: Option<String>,
26776    /// The event (default `"input"`) to listen for to track changes on the external element.
26777    #[serde(skip_serializing_if = "Option::is_none")]
26778    #[builder(default)]
26779    pub event: Option<String>,
26780    #[serde(skip_serializing_if = "Option::is_none")]
26781    #[builder(default)]
26782    pub between: Option<Vec<Stream>>,
26783    #[serde(skip_serializing_if = "Option::is_none")]
26784    #[builder(default)]
26785    pub consume: Option<bool>,
26786    #[serde(skip_serializing_if = "Option::is_none")]
26787    #[builder(default)]
26788    pub filter: Option<LegendText>,
26789    #[serde(skip_serializing_if = "Option::is_none")]
26790    #[builder(default)]
26791    pub markname: Option<String>,
26792    #[serde(skip_serializing_if = "Option::is_none")]
26793    #[builder(default)]
26794    pub marktype: Option<MarkType>,
26795    #[serde(skip_serializing_if = "Option::is_none")]
26796    #[builder(default)]
26797    pub source: Option<Source>,
26798    #[serde(skip_serializing_if = "Option::is_none")]
26799    #[builder(default)]
26800    pub throttle: Option<f64>,
26801    #[serde(rename = "type")]
26802    #[serde(skip_serializing_if = "Option::is_none")]
26803    #[builder(default)]
26804    pub binding_type: Option<String>,
26805    #[serde(skip_serializing_if = "Option::is_none")]
26806    #[builder(default)]
26807    pub stream: Option<Stream>,
26808    #[serde(skip_serializing_if = "Option::is_none")]
26809    #[builder(default)]
26810    pub merge: Option<Vec<Stream>>,
26811}
26812
26813/// Determines the default event processing and data query for the selection. Vega-Lite
26814/// currently supports two selection types:
26815///
26816/// - `"point"` -- to select multiple discrete data values; the first value is selected on
26817/// `click` and additional values toggled on shift-click.
26818/// - `"interval"` -- to select a continuous range of data values on `drag`.
26819#[derive(Debug, Clone, Serialize, Deserialize)]
26820#[serde(untagged)]
26821#[derive(From)]
26822pub enum TopLevelParameterSelect {
26823    Enum(SelectionType),
26824    SelectionConfig(SelectionConfig),
26825}
26826
26827#[derive(Debug, Clone, Serialize, Deserialize)]
26828#[serde(untagged)]
26829#[derive(From)]
26830pub enum RangeValue {
26831    AnythingArray(Vec<Option<serde_json::Value>>),
26832    Enum(RangeEnum),
26833    RangeClass(RangeClass),
26834}
26835
26836#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
26837#[builder(setter(into, strip_option))]
26838pub struct RangeClass {
26839    #[serde(skip_serializing_if = "Option::is_none")]
26840    #[builder(default)]
26841    pub count: Option<f64>,
26842    #[serde(skip_serializing_if = "Option::is_none")]
26843    #[builder(default)]
26844    pub extent: Option<Vec<f64>>,
26845    #[serde(skip_serializing_if = "Option::is_none")]
26846    #[builder(default)]
26847    pub scheme: Option<RangeText>,
26848}
26849
26850/// A string or array of strings indicating the name of custom styles to apply to the mark. A
26851/// style is a named collection of mark property defaults defined within the [style
26852/// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
26853/// an array, later styles will override earlier styles. Any [mark
26854/// properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly
26855/// defined within the `encoding` will override a style default.
26856///
26857/// __Default value:__ The mark's name. For example, a bar mark will have style `"bar"` by
26858/// default. __Note:__ Any specified style will augment the default style. For example, a bar
26859/// mark with `"style": "foo"` will receive from `config.style.bar` and `config.style.foo`
26860/// (the specified style `"foo"` has higher precedence).
26861///
26862/// A string or array of strings indicating the name of custom styles to apply to the axis. A
26863/// style is a named collection of axis property defined within the [style
26864/// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
26865/// an array, later styles will override earlier styles.
26866///
26867/// __Default value:__ (none) __Note:__ Any specified style will augment the default style.
26868/// For example, an x-axis mark with `"style": "foo"` will use `config.axisX` and
26869/// `config.style.foo` (the specified style `"foo"` has higher precedence).
26870///
26871/// A [mark style property](https://vega.github.io/vega-lite/docs/config.html#style) to apply
26872/// to the title text mark.
26873///
26874/// __Default value:__ `"group-title"`.
26875///
26876/// Placeholder text if the `text` channel is not specified
26877///
26878/// The subtitle Text.
26879///
26880/// A string or array of strings indicating the name of custom styles to apply to the view
26881/// background. A style is a named collection of mark property defaults defined within the
26882/// [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If
26883/// style is an array, later styles will override earlier styles.
26884///
26885/// __Default value:__ `"cell"` __Note:__ Any specified view background properties will
26886/// augment the default style.
26887#[derive(Debug, Clone, Serialize, Deserialize)]
26888#[serde(untagged)]
26889#[derive(From)]
26890pub enum RangeText {
26891    String(String),
26892    StringArray(Vec<String>),
26893}
26894
26895/// Scale configuration determines default properties for all
26896/// [scales](https://vega.github.io/vega-lite/docs/scale.html). For a full list of scale
26897/// configuration options, please see the [corresponding section of the scale
26898/// documentation](https://vega.github.io/vega-lite/docs/scale.html#config).
26899#[derive(Debug, Clone, Serialize, Deserialize)]
26900#[serde(rename_all = "camelCase")]
26901#[derive(Default, Builder)]
26902#[builder(setter(into, strip_option))]
26903pub struct ScaleConfig {
26904    /// Default animation duration (in seconds) for time encodings, except for
26905    /// [`band`](https://vega.github.io/vega-lite/docs/scale.html#band) scales.
26906    ///
26907    /// __Default value:__ `5`
26908    #[serde(skip_serializing_if = "Option::is_none")]
26909    #[builder(default)]
26910    pub animation_duration: Option<f64>,
26911    /// Default inner padding for `x` and `y` band scales.
26912    ///
26913    /// __Default value:__
26914    /// - `nestedOffsetPaddingInner` for x/y scales with nested x/y offset scales.
26915    /// - `barBandPaddingInner` for bar marks (`0.1` by default)
26916    /// - `rectBandPaddingInner` for rect and other marks (`0` by default)
26917    #[serde(skip_serializing_if = "Option::is_none")]
26918    #[builder(default)]
26919    pub band_padding_inner: Option<CornerRadiusUnion>,
26920    /// Default outer padding for `x` and `y` band scales.
26921    ///
26922    /// __Default value:__ `paddingInner/2` (which makes _width/height = number of unique values
26923    /// * step_)
26924    #[serde(skip_serializing_if = "Option::is_none")]
26925    #[builder(default)]
26926    pub band_padding_outer: Option<CornerRadiusUnion>,
26927    /// Default inner padding for `x` and `y` band scales with nested `xOffset` and `yOffset`
26928    /// encoding.
26929    ///
26930    /// __Default value:__ `0.2`
26931    #[serde(skip_serializing_if = "Option::is_none")]
26932    #[builder(default)]
26933    pub band_with_nested_offset_padding_inner: Option<CornerRadiusUnion>,
26934    /// Default outer padding for `x` and `y` band scales with nested `xOffset` and `yOffset`
26935    /// encoding.
26936    ///
26937    /// __Default value:__ `0.2`
26938    #[serde(skip_serializing_if = "Option::is_none")]
26939    #[builder(default)]
26940    pub band_with_nested_offset_padding_outer: Option<CornerRadiusUnion>,
26941    /// Default inner padding for `x` and `y` band-ordinal scales of `"bar"` marks.
26942    ///
26943    /// __Default value:__ `0.1`
26944    #[serde(skip_serializing_if = "Option::is_none")]
26945    #[builder(default)]
26946    pub bar_band_padding_inner: Option<CornerRadiusUnion>,
26947    /// If true, values that exceed the data domain are clamped to either the minimum or maximum
26948    /// range value
26949    #[serde(skip_serializing_if = "Option::is_none")]
26950    #[builder(default)]
26951    pub clamp: Option<Aria>,
26952    /// Default padding for continuous x/y scales.
26953    ///
26954    /// __Default:__ The bar width for continuous x-scale of a vertical bar and continuous
26955    /// y-scale of a horizontal bar.; `0` otherwise.
26956    #[serde(skip_serializing_if = "Option::is_none")]
26957    #[builder(default)]
26958    pub continuous_padding: Option<CornerRadiusUnion>,
26959    /// Default framerate (frames per second) for time
26960    /// [`band`](https://vega.github.io/vega-lite/docs/scale.html#band) scales.
26961    ///
26962    /// __Default value:__ `2`
26963    #[serde(skip_serializing_if = "Option::is_none")]
26964    #[builder(default)]
26965    pub frames_per_second: Option<f64>,
26966    /// An object that defines scale outputs per channel for invalid values (nulls and NaNs on a
26967    /// continuous scale).
26968    /// - The keys in this object are the scale channels.
26969    /// - The values is either `"zero-or-min"` (use zero if the scale includes zero or min value
26970    /// otherwise) or a value definition `{value: ...}`.
26971    ///
26972    /// _Example:_ Setting this `config.scale.invalid` property to `{color: {value: '#aaa'}}`
26973    /// will make the visualization color all invalid values with '#aaa'.
26974    ///
26975    /// See [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for more
26976    /// details.
26977    #[serde(skip_serializing_if = "Option::is_none")]
26978    #[builder(default)]
26979    pub invalid: Option<ScaleInvalidDataConfig>,
26980    /// The default max value for mapping quantitative fields to bar's size/bandSize.
26981    ///
26982    /// If undefined (default), we will use the axis's size (width or height) - 1.
26983    #[serde(skip_serializing_if = "Option::is_none")]
26984    #[builder(default)]
26985    pub max_band_size: Option<f64>,
26986    /// The default max value for mapping quantitative fields to text's size/fontSize scale.
26987    ///
26988    /// __Default value:__ `40`
26989    #[serde(skip_serializing_if = "Option::is_none")]
26990    #[builder(default)]
26991    pub max_font_size: Option<f64>,
26992    /// Default max opacity for mapping a field to opacity.
26993    ///
26994    /// __Default value:__ `0.8`
26995    #[serde(skip_serializing_if = "Option::is_none")]
26996    #[builder(default)]
26997    pub max_opacity: Option<f64>,
26998    /// Default max value for point size scale.
26999    #[serde(skip_serializing_if = "Option::is_none")]
27000    #[builder(default)]
27001    pub max_size: Option<f64>,
27002    /// Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size
27003    /// for trail marks.
27004    ///
27005    /// __Default value:__ `4`
27006    #[serde(skip_serializing_if = "Option::is_none")]
27007    #[builder(default)]
27008    pub max_stroke_width: Option<f64>,
27009    /// The default min value for mapping quantitative fields to bar and tick's size/bandSize
27010    /// scale.
27011    ///
27012    /// __Default value:__ `2`
27013    #[serde(skip_serializing_if = "Option::is_none")]
27014    #[builder(default)]
27015    pub min_band_size: Option<f64>,
27016    /// The default min value for mapping quantitative fields to text's size/fontSize scale.
27017    ///
27018    /// __Default value:__ `8`
27019    #[serde(skip_serializing_if = "Option::is_none")]
27020    #[builder(default)]
27021    pub min_font_size: Option<f64>,
27022    /// Default minimum opacity for mapping a field to opacity.
27023    ///
27024    /// __Default value:__ `0.3`
27025    #[serde(skip_serializing_if = "Option::is_none")]
27026    #[builder(default)]
27027    pub min_opacity: Option<f64>,
27028    /// Default minimum value for point size scale.
27029    ///
27030    /// __Default value:__ `9`
27031    #[serde(skip_serializing_if = "Option::is_none")]
27032    #[builder(default)]
27033    pub min_size: Option<f64>,
27034    /// Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of
27035    /// size for trail marks.
27036    ///
27037    /// __Default value:__ `1`
27038    #[serde(skip_serializing_if = "Option::is_none")]
27039    #[builder(default)]
27040    pub min_stroke_width: Option<f64>,
27041    /// Default padding inner for xOffset/yOffset's band scales.
27042    ///
27043    /// __Default Value:__ `0`
27044    #[serde(skip_serializing_if = "Option::is_none")]
27045    #[builder(default)]
27046    pub offset_band_padding_inner: Option<CornerRadiusUnion>,
27047    /// Default padding outer for xOffset/yOffset's band scales.
27048    ///
27049    /// __Default Value:__ `0`
27050    #[serde(skip_serializing_if = "Option::is_none")]
27051    #[builder(default)]
27052    pub offset_band_padding_outer: Option<CornerRadiusUnion>,
27053    /// Default outer padding for `x` and `y` point-ordinal scales.
27054    ///
27055    /// __Default value:__ `0.5` (which makes _width/height = number of unique values * step_)
27056    #[serde(skip_serializing_if = "Option::is_none")]
27057    #[builder(default)]
27058    pub point_padding: Option<CornerRadiusUnion>,
27059    /// Default range cardinality for
27060    /// [`quantile`](https://vega.github.io/vega-lite/docs/scale.html#quantile) scale.
27061    ///
27062    /// __Default value:__ `4`
27063    #[serde(skip_serializing_if = "Option::is_none")]
27064    #[builder(default)]
27065    pub quantile_count: Option<f64>,
27066    /// Default range cardinality for
27067    /// [`quantize`](https://vega.github.io/vega-lite/docs/scale.html#quantize) scale.
27068    ///
27069    /// __Default value:__ `4`
27070    #[serde(skip_serializing_if = "Option::is_none")]
27071    #[builder(default)]
27072    pub quantize_count: Option<f64>,
27073    /// Default inner padding for `x` and `y` band-ordinal scales of `"rect"` marks.
27074    ///
27075    /// __Default value:__ `0`
27076    #[serde(skip_serializing_if = "Option::is_none")]
27077    #[builder(default)]
27078    pub rect_band_padding_inner: Option<CornerRadiusUnion>,
27079    /// If true, rounds numeric output values to integers. This can be helpful for snapping to
27080    /// the pixel grid. (Only available for `x`, `y`, and `size` scales.)
27081    #[serde(skip_serializing_if = "Option::is_none")]
27082    #[builder(default)]
27083    pub round: Option<Aria>,
27084    /// Default inner padding for `x` and `y` band-ordinal scales of `"tick"` marks.
27085    ///
27086    /// __Default value:__ `0.25`
27087    #[serde(skip_serializing_if = "Option::is_none")]
27088    #[builder(default)]
27089    pub tick_band_padding_inner: Option<CornerRadiusUnion>,
27090    /// Use the source data range before aggregation as scale domain instead of aggregated data
27091    /// for aggregate axis.
27092    ///
27093    /// This is equivalent to setting `domain` to `"unaggregate"` for aggregated _quantitative_
27094    /// fields by default.
27095    ///
27096    /// This property only works with aggregate functions that produce values within the raw data
27097    /// domain (`"mean"`, `"average"`, `"median"`, `"q1"`, `"q3"`, `"min"`, `"max"`). For other
27098    /// aggregations that produce values outside of the raw data domain (e.g. `"count"`,
27099    /// `"sum"`), this property is ignored.
27100    ///
27101    /// __Default value:__ `false`
27102    #[serde(skip_serializing_if = "Option::is_none")]
27103    #[builder(default)]
27104    pub use_unaggregated_domain: Option<bool>,
27105    /// Reverse x-scale by default (useful for right-to-left charts).
27106    #[serde(skip_serializing_if = "Option::is_none")]
27107    #[builder(default)]
27108    pub x_reverse: Option<Aria>,
27109    /// Default `scale.zero` for
27110    /// [`continuous`](https://vega.github.io/vega-lite/docs/scale.html#continuous) scales except
27111    /// for (1) x/y-scales of non-ranged bar or area charts and (2) size scales.
27112    ///
27113    /// __Default value:__ `true`
27114    #[serde(skip_serializing_if = "Option::is_none")]
27115    #[builder(default)]
27116    pub zero: Option<bool>,
27117}
27118
27119/// An object that defines scale outputs per channel for invalid values (nulls and NaNs on a
27120/// continuous scale).
27121/// - The keys in this object are the scale channels.
27122/// - The values is either `"zero-or-min"` (use zero if the scale includes zero or min value
27123/// otherwise) or a value definition `{value: ...}`.
27124///
27125/// _Example:_ Setting this `config.scale.invalid` property to `{color: {value: '#aaa'}}`
27126/// will make the visualization color all invalid values with '#aaa'.
27127///
27128/// See [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for more
27129/// details.
27130#[derive(Debug, Clone, Serialize, Deserialize)]
27131#[serde(rename_all = "camelCase")]
27132#[derive(Default, Builder)]
27133#[builder(setter(into, strip_option))]
27134pub struct ScaleInvalidDataConfig {
27135    #[serde(skip_serializing_if = "Option::is_none")]
27136    #[builder(default)]
27137    pub angle: Option<ScaleInvalidDataShowAsAngle>,
27138    #[serde(skip_serializing_if = "Option::is_none")]
27139    #[builder(default)]
27140    pub color: Option<ScaleInvalidDataShowAsColor>,
27141    #[serde(skip_serializing_if = "Option::is_none")]
27142    #[builder(default)]
27143    pub fill: Option<ScaleInvalidDataShowAsFill>,
27144    #[serde(skip_serializing_if = "Option::is_none")]
27145    #[builder(default)]
27146    pub fill_opacity: Option<ScaleInvalidDataShowAsFillOpacity>,
27147    #[serde(skip_serializing_if = "Option::is_none")]
27148    #[builder(default)]
27149    pub opacity: Option<ScaleInvalidDataShowAsOpacity>,
27150    #[serde(skip_serializing_if = "Option::is_none")]
27151    #[builder(default)]
27152    pub radius: Option<ScaleInvalidDataShowAsRadius>,
27153    #[serde(skip_serializing_if = "Option::is_none")]
27154    #[builder(default)]
27155    pub shape: Option<ScaleInvalidDataShowAsShape>,
27156    #[serde(skip_serializing_if = "Option::is_none")]
27157    #[builder(default)]
27158    pub size: Option<ScaleInvalidDataShowAsSize>,
27159    #[serde(skip_serializing_if = "Option::is_none")]
27160    #[builder(default)]
27161    pub stroke: Option<ScaleInvalidDataShowAsStroke>,
27162    #[serde(skip_serializing_if = "Option::is_none")]
27163    #[builder(default)]
27164    pub stroke_dash: Option<ScaleInvalidDataShowAsStrokeDash>,
27165    #[serde(skip_serializing_if = "Option::is_none")]
27166    #[builder(default)]
27167    pub stroke_opacity: Option<ScaleInvalidDataShowAsStrokeOpacity>,
27168    #[serde(skip_serializing_if = "Option::is_none")]
27169    #[builder(default)]
27170    pub stroke_width: Option<ScaleInvalidDataShowAsStrokeWidth>,
27171    #[serde(skip_serializing_if = "Option::is_none")]
27172    #[builder(default)]
27173    pub theta: Option<ScaleInvalidDataShowAsTheta>,
27174    #[serde(skip_serializing_if = "Option::is_none")]
27175    #[builder(default)]
27176    pub time: Option<ScaleInvalidDataShowAsTime>,
27177    #[serde(skip_serializing_if = "Option::is_none")]
27178    #[builder(default)]
27179    pub x: Option<ScaleInvalidDataShowAsX>,
27180    #[serde(skip_serializing_if = "Option::is_none")]
27181    #[builder(default)]
27182    pub x_offset: Option<ScaleInvalidDataShowAsXOffset>,
27183    #[serde(skip_serializing_if = "Option::is_none")]
27184    #[builder(default)]
27185    pub y: Option<ScaleInvalidDataShowAsY>,
27186    #[serde(skip_serializing_if = "Option::is_none")]
27187    #[builder(default)]
27188    pub y_offset: Option<ScaleInvalidDataShowAsYOffset>,
27189}
27190
27191#[derive(Debug, Clone, Serialize, Deserialize)]
27192#[serde(untagged)]
27193#[derive(From)]
27194pub enum ScaleInvalidDataShowAsAngle {
27195    Enum(ScaleInvalidDataShowAs),
27196    ScaleInvalidDataShowAsValueAngle(ScaleInvalidDataShowAsValueAngle),
27197}
27198
27199#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27200#[builder(setter(into, strip_option))]
27201pub struct ScaleInvalidDataShowAsValueAngle {
27202    /// The rotation angle of the text, in degrees.
27203    #[serde(skip_serializing_if = "Option::is_none")]
27204    #[builder(default)]
27205    pub value: Option<f64>,
27206}
27207
27208#[derive(Debug, Clone, Serialize, Deserialize)]
27209#[serde(rename_all = "kebab-case")]
27210pub enum ScaleInvalidDataShowAs {
27211    #[serde(rename = "zero-or-min")]
27212    ZeroOrMin,
27213}
27214
27215#[derive(Debug, Clone, Serialize, Deserialize)]
27216#[serde(untagged)]
27217#[derive(From)]
27218pub enum ScaleInvalidDataShowAsColor {
27219    Enum(ScaleInvalidDataShowAs),
27220    ScaleInvalidDataShowAsValueColor(ScaleInvalidDataShowAsValueColor),
27221}
27222
27223#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27224#[builder(setter(into, strip_option))]
27225pub struct ScaleInvalidDataShowAsValueColor {
27226    /// Default color.
27227    ///
27228    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
27229    ///
27230    /// __Note:__
27231    /// - This property cannot be used in a [style
27232    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
27233    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
27234    /// override `color`.
27235    #[serde(skip_serializing_if = "Option::is_none")]
27236    #[builder(default)]
27237    pub value: Option<ScaleInvalidDataShowAsValueColorValue>,
27238}
27239
27240/// Default color.
27241///
27242/// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
27243///
27244/// __Note:__
27245/// - This property cannot be used in a [style
27246/// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
27247/// - The `fill` and `stroke` properties have higher precedence than `color` and will
27248/// override `color`.
27249#[derive(Debug, Clone, Serialize, Deserialize)]
27250#[serde(untagged)]
27251#[derive(From)]
27252pub enum ScaleInvalidDataShowAsValueColorValue {
27253    PurpleGradient(PurpleGradient),
27254    String(String),
27255}
27256
27257#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27258#[builder(setter(into, strip_option))]
27259pub struct PurpleGradient {
27260    /// The type of gradient. Use `"linear"` for a linear gradient.
27261    ///
27262    /// The type of gradient. Use `"radial"` for a radial gradient.
27263    #[serde(skip_serializing_if = "Option::is_none")]
27264    #[builder(default)]
27265    pub gradient: Option<Gradient>,
27266    #[serde(skip_serializing_if = "Option::is_none")]
27267    #[builder(default)]
27268    pub id: Option<String>,
27269    /// An array of gradient stops defining the gradient color sequence.
27270    pub stops: Vec<GradientStop>,
27271    /// The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
27272    ///
27273    /// __Default value:__ `0`
27274    ///
27275    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
27276    /// for the gradient.
27277    ///
27278    /// __Default value:__ `0.5`
27279    #[serde(skip_serializing_if = "Option::is_none")]
27280    #[builder(default)]
27281    pub x1: Option<f64>,
27282    /// The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
27283    ///
27284    /// __Default value:__ `1`
27285    ///
27286    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
27287    /// for the gradient.
27288    ///
27289    /// __Default value:__ `0.5`
27290    #[serde(skip_serializing_if = "Option::is_none")]
27291    #[builder(default)]
27292    pub x2: Option<f64>,
27293    /// The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
27294    ///
27295    /// __Default value:__ `0`
27296    ///
27297    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
27298    /// for the gradient.
27299    ///
27300    /// __Default value:__ `0.5`
27301    #[serde(skip_serializing_if = "Option::is_none")]
27302    #[builder(default)]
27303    pub y1: Option<f64>,
27304    /// The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
27305    ///
27306    /// __Default value:__ `0`
27307    ///
27308    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
27309    /// for the gradient.
27310    ///
27311    /// __Default value:__ `0.5`
27312    #[serde(skip_serializing_if = "Option::is_none")]
27313    #[builder(default)]
27314    pub y2: Option<f64>,
27315    /// The radius length, in normalized [0, 1] coordinates, of the inner circle for the
27316    /// gradient.
27317    ///
27318    /// __Default value:__ `0`
27319    #[serde(skip_serializing_if = "Option::is_none")]
27320    #[builder(default)]
27321    pub r1: Option<f64>,
27322    /// The radius length, in normalized [0, 1] coordinates, of the outer circle for the
27323    /// gradient.
27324    ///
27325    /// __Default value:__ `0.5`
27326    #[serde(skip_serializing_if = "Option::is_none")]
27327    #[builder(default)]
27328    pub r2: Option<f64>,
27329}
27330
27331#[derive(Debug, Clone, Serialize, Deserialize)]
27332#[serde(untagged)]
27333#[derive(From)]
27334pub enum ScaleInvalidDataShowAsFill {
27335    Enum(ScaleInvalidDataShowAs),
27336    ScaleInvalidDataShowAsValueFill(ScaleInvalidDataShowAsValueFill),
27337}
27338
27339#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27340#[builder(setter(into, strip_option))]
27341pub struct ScaleInvalidDataShowAsValueFill {
27342    /// Default fill color. This property has higher precedence than `config.color`. Set to
27343    /// `null` to remove fill.
27344    ///
27345    /// __Default value:__ (None)
27346    #[serde(skip_serializing_if = "Option::is_none")]
27347    #[builder(default)]
27348    pub value: Option<ScaleInvalidDataShowAsValueFillValue>,
27349}
27350
27351#[derive(Debug, Clone, Serialize, Deserialize)]
27352#[serde(untagged)]
27353#[derive(From)]
27354pub enum ScaleInvalidDataShowAsValueFillValue {
27355    FluffyGradient(FluffyGradient),
27356    String(String),
27357}
27358
27359#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27360#[builder(setter(into, strip_option))]
27361pub struct FluffyGradient {
27362    /// The type of gradient. Use `"linear"` for a linear gradient.
27363    ///
27364    /// The type of gradient. Use `"radial"` for a radial gradient.
27365    #[serde(skip_serializing_if = "Option::is_none")]
27366    #[builder(default)]
27367    pub gradient: Option<Gradient>,
27368    #[serde(skip_serializing_if = "Option::is_none")]
27369    #[builder(default)]
27370    pub id: Option<String>,
27371    /// An array of gradient stops defining the gradient color sequence.
27372    pub stops: Vec<GradientStop>,
27373    /// The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
27374    ///
27375    /// __Default value:__ `0`
27376    ///
27377    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
27378    /// for the gradient.
27379    ///
27380    /// __Default value:__ `0.5`
27381    #[serde(skip_serializing_if = "Option::is_none")]
27382    #[builder(default)]
27383    pub x1: Option<f64>,
27384    /// The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
27385    ///
27386    /// __Default value:__ `1`
27387    ///
27388    /// The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
27389    /// for the gradient.
27390    ///
27391    /// __Default value:__ `0.5`
27392    #[serde(skip_serializing_if = "Option::is_none")]
27393    #[builder(default)]
27394    pub x2: Option<f64>,
27395    /// The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
27396    ///
27397    /// __Default value:__ `0`
27398    ///
27399    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle
27400    /// for the gradient.
27401    ///
27402    /// __Default value:__ `0.5`
27403    #[serde(skip_serializing_if = "Option::is_none")]
27404    #[builder(default)]
27405    pub y1: Option<f64>,
27406    /// The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
27407    ///
27408    /// __Default value:__ `0`
27409    ///
27410    /// The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle
27411    /// for the gradient.
27412    ///
27413    /// __Default value:__ `0.5`
27414    #[serde(skip_serializing_if = "Option::is_none")]
27415    #[builder(default)]
27416    pub y2: Option<f64>,
27417    /// The radius length, in normalized [0, 1] coordinates, of the inner circle for the
27418    /// gradient.
27419    ///
27420    /// __Default value:__ `0`
27421    #[serde(skip_serializing_if = "Option::is_none")]
27422    #[builder(default)]
27423    pub r1: Option<f64>,
27424    /// The radius length, in normalized [0, 1] coordinates, of the outer circle for the
27425    /// gradient.
27426    ///
27427    /// __Default value:__ `0.5`
27428    #[serde(skip_serializing_if = "Option::is_none")]
27429    #[builder(default)]
27430    pub r2: Option<f64>,
27431}
27432
27433#[derive(Debug, Clone, Serialize, Deserialize)]
27434#[serde(untagged)]
27435#[derive(From)]
27436pub enum ScaleInvalidDataShowAsFillOpacity {
27437    Enum(ScaleInvalidDataShowAs),
27438    ScaleInvalidDataShowAsValueFillOpacity(ScaleInvalidDataShowAsValueFillOpacity),
27439}
27440
27441#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27442#[builder(setter(into, strip_option))]
27443pub struct ScaleInvalidDataShowAsValueFillOpacity {
27444    /// The fill opacity (value between [0,1]).
27445    ///
27446    /// __Default value:__ `1`
27447    #[serde(skip_serializing_if = "Option::is_none")]
27448    #[builder(default)]
27449    pub value: Option<f64>,
27450}
27451
27452#[derive(Debug, Clone, Serialize, Deserialize)]
27453#[serde(untagged)]
27454#[derive(From)]
27455pub enum ScaleInvalidDataShowAsOpacity {
27456    Enum(ScaleInvalidDataShowAs),
27457    ScaleInvalidDataShowAsValueOpacity(ScaleInvalidDataShowAsValueOpacity),
27458}
27459
27460#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27461#[builder(setter(into, strip_option))]
27462pub struct ScaleInvalidDataShowAsValueOpacity {
27463    /// The overall opacity (value between [0,1]).
27464    ///
27465    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
27466    /// `square` marks or layered `bar` charts and `1` otherwise.
27467    #[serde(skip_serializing_if = "Option::is_none")]
27468    #[builder(default)]
27469    pub value: Option<f64>,
27470}
27471
27472#[derive(Debug, Clone, Serialize, Deserialize)]
27473#[serde(untagged)]
27474#[derive(From)]
27475pub enum ScaleInvalidDataShowAsRadius {
27476    Enum(ScaleInvalidDataShowAs),
27477    ScaleInvalidDataShowAsValueRadius(ScaleInvalidDataShowAsValueRadius),
27478}
27479
27480#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27481#[builder(setter(into, strip_option))]
27482pub struct ScaleInvalidDataShowAsValueRadius {
27483    /// For arc mark, the primary (outer) radius in pixels.
27484    ///
27485    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
27486    /// determined by the `x` and `y` properties.
27487    ///
27488    /// __Default value:__ `min(plot_width, plot_height)/2`
27489    #[serde(skip_serializing_if = "Option::is_none")]
27490    #[builder(default)]
27491    pub value: Option<f64>,
27492}
27493
27494#[derive(Debug, Clone, Serialize, Deserialize)]
27495#[serde(untagged)]
27496#[derive(From)]
27497pub enum ScaleInvalidDataShowAsShape {
27498    Enum(ScaleInvalidDataShowAs),
27499    ScaleInvalidDataShowAsValueShape(ScaleInvalidDataShowAsValueShape),
27500}
27501
27502#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27503#[builder(setter(into, strip_option))]
27504pub struct ScaleInvalidDataShowAsValueShape {
27505    /// Shape of the point marks. Supported values include:
27506    /// - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,
27507    /// `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`.
27508    /// - the line symbol `"stroke"`
27509    /// - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"`
27510    /// - a custom [SVG path
27511    /// string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct
27512    /// sizing, custom shape paths should be defined within a square bounding box with
27513    /// coordinates ranging from -1 to 1 along both the x and y dimensions.)
27514    ///
27515    /// __Default value:__ `"circle"`
27516    #[serde(skip_serializing_if = "Option::is_none")]
27517    #[builder(default)]
27518    pub value: Option<String>,
27519}
27520
27521#[derive(Debug, Clone, Serialize, Deserialize)]
27522#[serde(untagged)]
27523#[derive(From)]
27524pub enum ScaleInvalidDataShowAsSize {
27525    Enum(ScaleInvalidDataShowAs),
27526    ScaleInvalidDataShowAsValueSize(ScaleInvalidDataShowAsValueSize),
27527}
27528
27529#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27530#[builder(setter(into, strip_option))]
27531pub struct ScaleInvalidDataShowAsValueSize {
27532    /// Default size for marks.
27533    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
27534    /// this value sets the area of the symbol; the side lengths will increase with the square
27535    /// root of this value.
27536    /// - For `bar`, this represents the band size of the bar, in pixels.
27537    /// - For `text`, this represents the font size, in pixels.
27538    ///
27539    /// __Default value:__
27540    /// - `30` for point, circle, square marks; width/height's `step`
27541    /// - `2` for bar marks with discrete dimensions;
27542    /// - `5` for bar marks with continuous dimensions;
27543    /// - `11` for text marks.
27544    #[serde(skip_serializing_if = "Option::is_none")]
27545    #[builder(default)]
27546    pub value: Option<f64>,
27547}
27548
27549#[derive(Debug, Clone, Serialize, Deserialize)]
27550#[serde(untagged)]
27551#[derive(From)]
27552pub enum ScaleInvalidDataShowAsStroke {
27553    Enum(ScaleInvalidDataShowAs),
27554    ScaleInvalidDataShowAsValueStroke(ScaleInvalidDataShowAsValueStroke),
27555}
27556
27557#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27558#[builder(setter(into, strip_option))]
27559pub struct ScaleInvalidDataShowAsValueStroke {
27560    /// Default stroke color. This property has higher precedence than `config.color`. Set to
27561    /// `null` to remove stroke.
27562    ///
27563    /// __Default value:__ (None)
27564    #[serde(skip_serializing_if = "Option::is_none")]
27565    #[builder(default)]
27566    pub value: Option<ScaleInvalidDataShowAsValueFillValue>,
27567}
27568
27569#[derive(Debug, Clone, Serialize, Deserialize)]
27570#[serde(untagged)]
27571#[derive(From)]
27572pub enum ScaleInvalidDataShowAsStrokeDash {
27573    Enum(ScaleInvalidDataShowAs),
27574    ScaleInvalidDataShowAsValueStrokeDash(ScaleInvalidDataShowAsValueStrokeDash),
27575}
27576
27577#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27578#[builder(setter(into, strip_option))]
27579pub struct ScaleInvalidDataShowAsValueStrokeDash {
27580    /// An array of alternating stroke, space lengths for creating dashed or dotted lines.
27581    #[serde(skip_serializing_if = "Option::is_none")]
27582    #[builder(default)]
27583    pub value: Option<Vec<f64>>,
27584}
27585
27586#[derive(Debug, Clone, Serialize, Deserialize)]
27587#[serde(untagged)]
27588#[derive(From)]
27589pub enum ScaleInvalidDataShowAsStrokeOpacity {
27590    Enum(ScaleInvalidDataShowAs),
27591    ScaleInvalidDataShowAsValueStrokeOpacity(ScaleInvalidDataShowAsValueStrokeOpacity),
27592}
27593
27594#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27595#[builder(setter(into, strip_option))]
27596pub struct ScaleInvalidDataShowAsValueStrokeOpacity {
27597    /// The stroke opacity (value between [0,1]).
27598    ///
27599    /// __Default value:__ `1`
27600    #[serde(skip_serializing_if = "Option::is_none")]
27601    #[builder(default)]
27602    pub value: Option<f64>,
27603}
27604
27605#[derive(Debug, Clone, Serialize, Deserialize)]
27606#[serde(untagged)]
27607#[derive(From)]
27608pub enum ScaleInvalidDataShowAsStrokeWidth {
27609    Enum(ScaleInvalidDataShowAs),
27610    ScaleInvalidDataShowAsValueStrokeWidth(ScaleInvalidDataShowAsValueStrokeWidth),
27611}
27612
27613#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27614#[builder(setter(into, strip_option))]
27615pub struct ScaleInvalidDataShowAsValueStrokeWidth {
27616    /// The stroke width, in pixels.
27617    #[serde(skip_serializing_if = "Option::is_none")]
27618    #[builder(default)]
27619    pub value: Option<f64>,
27620}
27621
27622#[derive(Debug, Clone, Serialize, Deserialize)]
27623#[serde(untagged)]
27624#[derive(From)]
27625pub enum ScaleInvalidDataShowAsTheta {
27626    Enum(ScaleInvalidDataShowAs),
27627    ScaleInvalidDataShowAsValueTheta(ScaleInvalidDataShowAsValueTheta),
27628}
27629
27630#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27631#[builder(setter(into, strip_option))]
27632pub struct ScaleInvalidDataShowAsValueTheta {
27633    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
27634    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
27635    /// clockwise.)
27636    ///
27637    /// - For text marks, polar coordinate angle in radians.
27638    #[serde(skip_serializing_if = "Option::is_none")]
27639    #[builder(default)]
27640    pub value: Option<f64>,
27641}
27642
27643#[derive(Debug, Clone, Serialize, Deserialize)]
27644#[serde(untagged)]
27645#[derive(From)]
27646pub enum ScaleInvalidDataShowAsTime {
27647    Enum(ScaleInvalidDataShowAs),
27648    ScaleInvalidDataShowAsValueTime(ScaleInvalidDataShowAsValueTime),
27649}
27650
27651#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27652#[builder(setter(into, strip_option))]
27653pub struct ScaleInvalidDataShowAsValueTime {
27654    #[serde(skip_serializing_if = "Option::is_none")]
27655    #[builder(default)]
27656    pub value: Option<f64>,
27657}
27658
27659#[derive(Debug, Clone, Serialize, Deserialize)]
27660#[serde(untagged)]
27661#[derive(From)]
27662pub enum ScaleInvalidDataShowAsX {
27663    Enum(ScaleInvalidDataShowAs),
27664    ScaleInvalidDataShowAsValueX(ScaleInvalidDataShowAsValueX),
27665}
27666
27667#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27668#[builder(setter(into, strip_option))]
27669pub struct ScaleInvalidDataShowAsValueX {
27670    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
27671    /// `x2` or `width`.
27672    ///
27673    /// The `value` of this channel can be a number or a string `"width"` for the width of the
27674    /// plot.
27675    #[serde(skip_serializing_if = "Option::is_none")]
27676    #[builder(default)]
27677    pub value: Option<ScaleInvalidDataShowAsValueXValue>,
27678}
27679
27680/// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
27681/// `x2` or `width`.
27682///
27683/// The `value` of this channel can be a number or a string `"width"` for the width of the
27684/// plot.
27685#[derive(Debug, Clone, Serialize, Deserialize)]
27686#[serde(untagged)]
27687#[derive(From)]
27688pub enum ScaleInvalidDataShowAsValueXValue {
27689    Double(f64),
27690    Enum(XEnum),
27691}
27692
27693#[derive(Debug, Clone, Serialize, Deserialize)]
27694#[serde(untagged)]
27695#[derive(From)]
27696pub enum ScaleInvalidDataShowAsXOffset {
27697    Enum(ScaleInvalidDataShowAs),
27698    ScaleInvalidDataShowAsValueXOffset(ScaleInvalidDataShowAsValueXOffset),
27699}
27700
27701#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27702#[builder(setter(into, strip_option))]
27703pub struct ScaleInvalidDataShowAsValueXOffset {
27704    /// Offset for x-position.
27705    #[serde(skip_serializing_if = "Option::is_none")]
27706    #[builder(default)]
27707    pub value: Option<f64>,
27708}
27709
27710#[derive(Debug, Clone, Serialize, Deserialize)]
27711#[serde(untagged)]
27712#[derive(From)]
27713pub enum ScaleInvalidDataShowAsY {
27714    Enum(ScaleInvalidDataShowAs),
27715    ScaleInvalidDataShowAsValueY(ScaleInvalidDataShowAsValueY),
27716}
27717
27718#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27719#[builder(setter(into, strip_option))]
27720pub struct ScaleInvalidDataShowAsValueY {
27721    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
27722    /// `y2` or `height`.
27723    ///
27724    /// The `value` of this channel can be a number or a string `"height"` for the height of the
27725    /// plot.
27726    #[serde(skip_serializing_if = "Option::is_none")]
27727    #[builder(default)]
27728    pub value: Option<ScaleInvalidDataShowAsValueYValue>,
27729}
27730
27731/// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
27732/// `y2` or `height`.
27733///
27734/// The `value` of this channel can be a number or a string `"height"` for the height of the
27735/// plot.
27736#[derive(Debug, Clone, Serialize, Deserialize)]
27737#[serde(untagged)]
27738#[derive(From)]
27739pub enum ScaleInvalidDataShowAsValueYValue {
27740    Double(f64),
27741    Enum(YEnum),
27742}
27743
27744#[derive(Debug, Clone, Serialize, Deserialize)]
27745#[serde(untagged)]
27746#[derive(From)]
27747pub enum ScaleInvalidDataShowAsYOffset {
27748    Enum(ScaleInvalidDataShowAs),
27749    ScaleInvalidDataShowAsValueYOffset(ScaleInvalidDataShowAsValueYOffset),
27750}
27751
27752#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27753#[builder(setter(into, strip_option))]
27754pub struct ScaleInvalidDataShowAsValueYOffset {
27755    /// Offset for y-position.
27756    #[serde(skip_serializing_if = "Option::is_none")]
27757    #[builder(default)]
27758    pub value: Option<f64>,
27759}
27760
27761/// An object hash for defining default properties for each type of selections.
27762#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27763#[builder(setter(into, strip_option))]
27764pub struct SelectionClass {
27765    /// The default definition for an
27766    /// [`interval`](https://vega.github.io/vega-lite/docs/parameter.html#select) selection. All
27767    /// properties and transformations for an interval selection definition (except `type`) may
27768    /// be specified here.
27769    ///
27770    /// For instance, setting `interval` to `{"translate": false}` disables the ability to move
27771    /// interval selections by default.
27772    #[serde(skip_serializing_if = "Option::is_none")]
27773    #[builder(default)]
27774    pub interval: Option<IntervalSelectionConfigWithoutType>,
27775    /// The default definition for a
27776    /// [`point`](https://vega.github.io/vega-lite/docs/parameter.html#select) selection. All
27777    /// properties and transformations  for a point selection definition (except `type`) may be
27778    /// specified here.
27779    ///
27780    /// For instance, setting `point` to `{"on": "dblclick"}` populates point selections on
27781    /// double-click by default.
27782    #[serde(skip_serializing_if = "Option::is_none")]
27783    #[builder(default)]
27784    pub point: Option<PointSelectionConfigWithoutType>,
27785}
27786
27787/// The default definition for an
27788/// [`interval`](https://vega.github.io/vega-lite/docs/parameter.html#select) selection. All
27789/// properties and transformations for an interval selection definition (except `type`) may
27790/// be specified here.
27791///
27792/// For instance, setting `interval` to `{"translate": false}` disables the ability to move
27793/// interval selections by default.
27794#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27795#[builder(setter(into, strip_option))]
27796pub struct IntervalSelectionConfigWithoutType {
27797    /// Clears the selection, emptying it of all values. This property can be a [Event
27798    /// Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.
27799    ///
27800    /// __Default value:__ `dblclick`.
27801    ///
27802    /// __See also:__ [`clear` examples
27803    /// ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation.
27804    #[serde(skip_serializing_if = "Option::is_none")]
27805    #[builder(default)]
27806    pub clear: Option<ClearUnion>,
27807    /// An array of encoding channels. The corresponding data field values must match for a data
27808    /// tuple to fall within the selection.
27809    ///
27810    /// __See also:__ The [projection with `encodings` and `fields`
27811    /// section](https://vega.github.io/vega-lite/docs/selection.html#project) in the
27812    /// documentation.
27813    #[serde(skip_serializing_if = "Option::is_none")]
27814    #[builder(default)]
27815    pub encodings: Option<Vec<SingleDefUnitChannel>>,
27816    /// An array of field names whose values must match for a data tuple to fall within the
27817    /// selection.
27818    ///
27819    /// __See also:__ The [projection with `encodings` and `fields`
27820    /// section](https://vega.github.io/vega-lite/docs/selection.html#project) in the
27821    /// documentation.
27822    #[serde(skip_serializing_if = "Option::is_none")]
27823    #[builder(default)]
27824    pub fields: Option<Vec<String>>,
27825    /// An interval selection also adds a rectangle mark to depict the extents of the interval.
27826    /// The `mark` property can be used to customize the appearance of the mark.
27827    ///
27828    /// __See also:__ [`mark`
27829    /// examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation.
27830    #[serde(skip_serializing_if = "Option::is_none")]
27831    #[builder(default)]
27832    pub mark: Option<BrushConfig>,
27833    /// A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or
27834    /// selector) that triggers the selection. For interval selections, the event stream must
27835    /// specify a [start and
27836    /// end](https://vega.github.io/vega/docs/event-streams/#between-filters).
27837    ///
27838    /// __See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in
27839    /// the documentation.
27840    #[serde(skip_serializing_if = "Option::is_none")]
27841    #[builder(default)]
27842    pub on: Option<OnUnion>,
27843    /// With layered and multi-view displays, a strategy that determines how selections' data
27844    /// queries are resolved when applied in a filter transform, conditional encoding rule, or
27845    /// scale domain.
27846    ///
27847    /// One of:
27848    /// - `"global"` -- only one brush exists for the entire SPLOM. When the user begins to drag,
27849    /// any previous brushes are cleared, and a new one is constructed.
27850    /// - `"union"` -- each cell contains its own brush, and points are highlighted if they lie
27851    /// within _any_ of these individual brushes.
27852    /// - `"intersect"` -- each cell contains its own brush, and points are highlighted only if
27853    /// they fall within _all_ of these individual brushes.
27854    ///
27855    /// __Default value:__ `global`.
27856    ///
27857    /// __See also:__ [`resolve`
27858    /// examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the
27859    /// documentation.
27860    #[serde(skip_serializing_if = "Option::is_none")]
27861    #[builder(default)]
27862    pub resolve: Option<SelectionResolution>,
27863    /// When truthy, allows a user to interactively move an interval selection back-and-forth.
27864    /// Can be `true`, `false` (to disable panning), or a [Vega event stream
27865    /// definition](https://vega.github.io/vega/docs/event-streams/) which must include a start
27866    /// and end event to trigger continuous panning. Discrete panning (e.g., pressing the
27867    /// left/right arrow keys) will be supported in future versions.
27868    ///
27869    /// __Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] >
27870    /// window:pointermove!`. This default allows users to clicks and drags within an interval
27871    /// selection to reposition it.
27872    ///
27873    /// __See also:__ [`translate`
27874    /// examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the
27875    /// documentation.
27876    #[serde(skip_serializing_if = "Option::is_none")]
27877    #[builder(default)]
27878    pub translate: Option<Toggle>,
27879    /// When truthy, allows a user to interactively resize an interval selection. Can be `true`,
27880    /// `false` (to disable zooming), or a [Vega event stream
27881    /// definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel`
27882    /// events are supported, but custom event streams can still be used to specify filters,
27883    /// debouncing, and throttling. Future versions will expand the set of events that can
27884    /// trigger this transformation.
27885    ///
27886    /// __Default value:__ `true`, which corresponds to `wheel!`. This default allows users to
27887    /// use the mouse wheel to resize an interval selection.
27888    ///
27889    /// __See also:__ [`zoom`
27890    /// examples](https://vega.github.io/vega-lite/docs/selection.html#zoom) in the documentation.
27891    #[serde(skip_serializing_if = "Option::is_none")]
27892    #[builder(default)]
27893    pub zoom: Option<Toggle>,
27894}
27895
27896/// The default definition for a
27897/// [`point`](https://vega.github.io/vega-lite/docs/parameter.html#select) selection. All
27898/// properties and transformations  for a point selection definition (except `type`) may be
27899/// specified here.
27900///
27901/// For instance, setting `point` to `{"on": "dblclick"}` populates point selections on
27902/// double-click by default.
27903#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
27904#[builder(setter(into, strip_option))]
27905pub struct PointSelectionConfigWithoutType {
27906    /// Clears the selection, emptying it of all values. This property can be a [Event
27907    /// Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.
27908    ///
27909    /// __Default value:__ `dblclick`.
27910    ///
27911    /// __See also:__ [`clear` examples
27912    /// ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation.
27913    #[serde(skip_serializing_if = "Option::is_none")]
27914    #[builder(default)]
27915    pub clear: Option<ClearUnion>,
27916    /// An array of encoding channels. The corresponding data field values must match for a data
27917    /// tuple to fall within the selection.
27918    ///
27919    /// __See also:__ The [projection with `encodings` and `fields`
27920    /// section](https://vega.github.io/vega-lite/docs/selection.html#project) in the
27921    /// documentation.
27922    #[serde(skip_serializing_if = "Option::is_none")]
27923    #[builder(default)]
27924    pub encodings: Option<Vec<SingleDefUnitChannel>>,
27925    /// An array of field names whose values must match for a data tuple to fall within the
27926    /// selection.
27927    ///
27928    /// __See also:__ The [projection with `encodings` and `fields`
27929    /// section](https://vega.github.io/vega-lite/docs/selection.html#project) in the
27930    /// documentation.
27931    #[serde(skip_serializing_if = "Option::is_none")]
27932    #[builder(default)]
27933    pub fields: Option<Vec<String>>,
27934    /// When true, an invisible voronoi diagram is computed to accelerate discrete selection. The
27935    /// data value _nearest_ the mouse cursor is added to the selection.
27936    ///
27937    /// __Default value:__ `false`, which means that data values must be interacted with directly
27938    /// (e.g., clicked on) to be added to the selection.
27939    ///
27940    /// __See also:__ [`nearest`
27941    /// examples](https://vega.github.io/vega-lite/docs/selection.html#nearest) documentation.
27942    #[serde(skip_serializing_if = "Option::is_none")]
27943    #[builder(default)]
27944    pub nearest: Option<bool>,
27945    /// A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or
27946    /// selector) that triggers the selection. For interval selections, the event stream must
27947    /// specify a [start and
27948    /// end](https://vega.github.io/vega/docs/event-streams/#between-filters).
27949    ///
27950    /// __See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in
27951    /// the documentation.
27952    #[serde(skip_serializing_if = "Option::is_none")]
27953    #[builder(default)]
27954    pub on: Option<OnUnion>,
27955    /// With layered and multi-view displays, a strategy that determines how selections' data
27956    /// queries are resolved when applied in a filter transform, conditional encoding rule, or
27957    /// scale domain.
27958    ///
27959    /// One of:
27960    /// - `"global"` -- only one brush exists for the entire SPLOM. When the user begins to drag,
27961    /// any previous brushes are cleared, and a new one is constructed.
27962    /// - `"union"` -- each cell contains its own brush, and points are highlighted if they lie
27963    /// within _any_ of these individual brushes.
27964    /// - `"intersect"` -- each cell contains its own brush, and points are highlighted only if
27965    /// they fall within _all_ of these individual brushes.
27966    ///
27967    /// __Default value:__ `global`.
27968    ///
27969    /// __See also:__ [`resolve`
27970    /// examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the
27971    /// documentation.
27972    #[serde(skip_serializing_if = "Option::is_none")]
27973    #[builder(default)]
27974    pub resolve: Option<SelectionResolution>,
27975    /// Controls whether data values should be toggled (inserted or removed from a point
27976    /// selection) or only ever inserted into point selections.
27977    ///
27978    /// One of:
27979    /// - `true` -- the default behavior, which corresponds to `"event.shiftKey"`.  As a result,
27980    /// data values are toggled when the user interacts with the shift-key pressed.
27981    /// - `false` -- disables toggling behaviour; the selection will only ever contain a single
27982    /// data value corresponding to the most recent interaction.
27983    /// - A [Vega expression](https://vega.github.io/vega/docs/expressions/) which is
27984    /// re-evaluated as the user interacts. If the expression evaluates to `true`, the data value
27985    /// is toggled into or out of the point selection. If the expression evaluates to `false`,
27986    /// the point selection is first cleared, and the data value is then inserted. For example,
27987    /// setting the value to the Vega expression `"true"` will toggle data values without the
27988    /// user pressing the shift-key.
27989    ///
27990    /// __Default value:__ `true`
27991    ///
27992    /// __See also:__ [`toggle`
27993    /// examples](https://vega.github.io/vega-lite/docs/selection.html#toggle) in the
27994    /// documentation.
27995    #[serde(skip_serializing_if = "Option::is_none")]
27996    #[builder(default)]
27997    pub toggle: Option<Toggle>,
27998}
27999
28000/// Arc-specific Config
28001///
28002/// Image-specific Config
28003///
28004/// Rect-Specific Config
28005///
28006/// Area-Specific Config
28007///
28008/// Bar-Specific Config
28009///
28010/// Circle-Specific Config
28011///
28012/// Geoshape-Specific Config
28013///
28014/// Mark Config
28015///
28016/// Point-Specific Config
28017///
28018/// Rule-Specific Config
28019///
28020/// Square-Specific Config
28021///
28022/// Default style for chart subtitles
28023///
28024/// Default style for chart titles
28025///
28026/// Default style for axis, legend, and header labels.
28027///
28028/// Default style for axis, legend, and header titles.
28029///
28030/// Text-Specific Config
28031///
28032/// Line-Specific Config
28033///
28034/// Trail-Specific Config
28035///
28036/// Tick-Specific Config
28037#[derive(Debug, Clone, Serialize, Deserialize)]
28038#[serde(rename_all = "camelCase")]
28039#[derive(Default, Builder)]
28040#[builder(setter(into, strip_option))]
28041pub struct StyleValue {
28042    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
28043    /// of `"left"`, `"right"`, `"center"`.
28044    ///
28045    /// __Note:__ Expression reference is *not* supported for range marks.
28046    #[serde(skip_serializing_if = "Option::is_none")]
28047    #[builder(default)]
28048    pub align: Option<TitleAlignUnion>,
28049    #[serde(skip_serializing_if = "Option::is_none")]
28050    #[builder(default)]
28051    pub angle: Option<Angle>,
28052    #[serde(skip_serializing_if = "Option::is_none")]
28053    #[builder(default)]
28054    pub aria: Option<Aria>,
28055    #[serde(skip_serializing_if = "Option::is_none")]
28056    #[builder(default)]
28057    pub aria_role: Option<Box<Color>>,
28058    #[serde(skip_serializing_if = "Option::is_none")]
28059    #[builder(default)]
28060    pub aria_role_description: Option<Box<Color>>,
28061    #[serde(skip_serializing_if = "Option::is_none")]
28062    #[builder(default)]
28063    pub aspect: Option<Aria>,
28064    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
28065    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
28066    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
28067    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
28068    /// rather than `fontSize` alone.
28069    ///
28070    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
28071    /// `"bottom"`.
28072    ///
28073    /// __Note:__ Expression reference is *not* supported for range marks.
28074    #[serde(skip_serializing_if = "Option::is_none")]
28075    #[builder(default)]
28076    pub baseline: Option<TextBaseline>,
28077    /// Offset between bars for binned field. The ideal value for this is either 0 (preferred by
28078    /// statisticians) or 1 (Vega-Lite default, D3 example style).
28079    ///
28080    /// __Default value:__ `1`
28081    #[serde(skip_serializing_if = "Option::is_none")]
28082    #[builder(default)]
28083    pub bin_spacing: Option<f64>,
28084    #[serde(skip_serializing_if = "Option::is_none")]
28085    #[builder(default)]
28086    pub blend: Option<BlendUnion>,
28087    /// Default color.
28088    ///
28089    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
28090    ///
28091    /// __Note:__
28092    /// - This property cannot be used in a [style
28093    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
28094    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
28095    /// override `color`.
28096    #[serde(skip_serializing_if = "Option::is_none")]
28097    #[builder(default)]
28098    pub color: Option<MarkConfigColor>,
28099    /// The default size of the bars on continuous scales.
28100    ///
28101    /// __Default value:__ `5`
28102    #[serde(skip_serializing_if = "Option::is_none")]
28103    #[builder(default)]
28104    pub continuous_band_size: Option<f64>,
28105    #[serde(skip_serializing_if = "Option::is_none")]
28106    #[builder(default)]
28107    pub corner_radius: Option<CornerRadiusUnion>,
28108    #[serde(skip_serializing_if = "Option::is_none")]
28109    #[builder(default)]
28110    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
28111    #[serde(skip_serializing_if = "Option::is_none")]
28112    #[builder(default)]
28113    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
28114    #[serde(skip_serializing_if = "Option::is_none")]
28115    #[builder(default)]
28116    pub corner_radius_top_left: Option<CornerRadiusUnion>,
28117    #[serde(skip_serializing_if = "Option::is_none")]
28118    #[builder(default)]
28119    pub corner_radius_top_right: Option<CornerRadiusUnion>,
28120    #[serde(skip_serializing_if = "Option::is_none")]
28121    #[builder(default)]
28122    pub cursor: Option<CursorUnion>,
28123    #[serde(skip_serializing_if = "Option::is_none")]
28124    #[builder(default)]
28125    pub description: Option<Box<Color>>,
28126    #[serde(skip_serializing_if = "Option::is_none")]
28127    #[builder(default)]
28128    pub dir: Option<Dir>,
28129    /// The default size of the bars with discrete dimensions. If unspecified, the default size
28130    /// is  `step-2`, which provides 2 pixel offset between bars.
28131    #[serde(skip_serializing_if = "Option::is_none")]
28132    #[builder(default)]
28133    pub discrete_band_size: Option<DiscreteBandSize>,
28134    #[serde(skip_serializing_if = "Option::is_none")]
28135    #[builder(default)]
28136    pub dx: Option<CornerRadiusUnion>,
28137    #[serde(skip_serializing_if = "Option::is_none")]
28138    #[builder(default)]
28139    pub dy: Option<CornerRadiusUnion>,
28140    #[serde(skip_serializing_if = "Option::is_none")]
28141    #[builder(default)]
28142    pub ellipsis: Option<Box<Color>>,
28143    #[serde(skip_serializing_if = "Option::is_none")]
28144    #[builder(default)]
28145    pub end_angle: Option<CornerRadiusUnion>,
28146    /// Default fill color. This property has higher precedence than `config.color`. Set to
28147    /// `null` to remove fill.
28148    ///
28149    /// __Default value:__ (None)
28150    #[serde(skip_serializing_if = "Option::is_none")]
28151    #[builder(default)]
28152    pub fill: Option<MarkConfigFill>,
28153    /// Whether the mark's color should be used as fill color instead of stroke color.
28154    ///
28155    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
28156    /// `geoshape` marks for
28157    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
28158    /// otherwise, `true`.
28159    ///
28160    /// __Note:__ This property cannot be used in a [style
28161    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
28162    #[serde(skip_serializing_if = "Option::is_none")]
28163    #[builder(default)]
28164    pub filled: Option<bool>,
28165    #[serde(skip_serializing_if = "Option::is_none")]
28166    #[builder(default)]
28167    pub fill_opacity: Option<Opacity>,
28168    #[serde(skip_serializing_if = "Option::is_none")]
28169    #[builder(default)]
28170    pub font: Option<Box<Color>>,
28171    #[serde(skip_serializing_if = "Option::is_none")]
28172    #[builder(default)]
28173    pub font_size: Option<FontSize>,
28174    #[serde(skip_serializing_if = "Option::is_none")]
28175    #[builder(default)]
28176    pub font_style: Option<Box<Color>>,
28177    #[serde(skip_serializing_if = "Option::is_none")]
28178    #[builder(default)]
28179    pub font_weight: Option<FontWeightUnion>,
28180    #[serde(skip_serializing_if = "Option::is_none")]
28181    #[builder(default)]
28182    pub height: Option<CornerRadiusUnion>,
28183    #[serde(skip_serializing_if = "Option::is_none")]
28184    #[builder(default)]
28185    pub href: Option<Box<Color>>,
28186    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
28187    ///
28188    /// __Default value:__ `0`
28189    #[serde(skip_serializing_if = "Option::is_none")]
28190    #[builder(default)]
28191    pub inner_radius: Option<CornerRadiusUnion>,
28192    #[serde(skip_serializing_if = "Option::is_none")]
28193    #[builder(default)]
28194    pub interpolate: Option<MarkConfigInterpolate>,
28195    /// Invalid data mode, which defines how the marks and corresponding scales should represent
28196    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
28197    /// invalid values).
28198    ///
28199    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
28200    /// *scales*. For path marks (for line, area, trail), this option will create paths that
28201    /// connect valid points, as if the data rows with invalid values do not exist.
28202    ///
28203    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
28204    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
28205    /// *exclude* these filtered data points.
28206    ///
28207    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
28208    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
28209    /// data points (for both path and non-path marks).
28210    ///
28211    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
28212    /// will use the output for invalid values defined in `config.scale.invalid` or, if
28213    /// unspecified, by default invalid values will produce the same visual values as zero (if
28214    /// the scale includes zero) or the minimum value (if the scale does not include zero).
28215    ///
28216    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
28217    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
28218    /// non-path marks.
28219    ///
28220    /// __Note__: If any channel's scale has an output for invalid values defined in
28221    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
28222    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
28223    /// be filtered and will not cause path breaks.
28224    #[serde(skip_serializing_if = "Option::is_none")]
28225    #[builder(default)]
28226    pub invalid: Option<MarkInvalidDataMode>,
28227    #[serde(skip_serializing_if = "Option::is_none")]
28228    #[builder(default)]
28229    pub limit: Option<CornerRadiusUnion>,
28230    #[serde(skip_serializing_if = "Option::is_none")]
28231    #[builder(default)]
28232    pub line_break: Option<Box<Color>>,
28233    #[serde(skip_serializing_if = "Option::is_none")]
28234    #[builder(default)]
28235    pub line_height: Option<CornerRadiusUnion>,
28236    /// The minimum band size for bar and rectangle marks. __Default value:__ `0.25`
28237    #[serde(skip_serializing_if = "Option::is_none")]
28238    #[builder(default)]
28239    pub min_band_size: Option<CornerRadiusUnion>,
28240    /// The overall opacity (value between [0,1]).
28241    ///
28242    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
28243    /// `square` marks or layered `bar` charts and `1` otherwise.
28244    #[serde(skip_serializing_if = "Option::is_none")]
28245    #[builder(default)]
28246    pub opacity: Option<CornerRadiusUnion>,
28247    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
28248    /// the lines use the original order in the data sources.
28249    #[serde(skip_serializing_if = "Option::is_none")]
28250    #[builder(default)]
28251    pub order: Option<bool>,
28252    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
28253    /// horizontal (default) or vertical.
28254    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
28255    /// applied to x or y dimension.
28256    /// - For area, this property determines the orient property of the Vega output.
28257    /// - For line and trail marks, this property determines the sort order of the points in the
28258    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
28259    /// determined by the orientation of the stack; therefore explicitly specified value will be
28260    /// ignored.
28261    ///
28262    /// The orientation of the axis. One of `"top"`, `"bottom"`, `"left"` or `"right"`. The
28263    /// orientation can be used to further specialize the axis type (e.g., a y-axis oriented
28264    /// towards the right edge of the chart).
28265    ///
28266    /// __Default value:__ `"bottom"` for x-axes and `"left"` for y-axes.
28267    #[serde(skip_serializing_if = "Option::is_none")]
28268    #[builder(default)]
28269    pub orient: Option<StyleOrient>,
28270    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
28271    ///
28272    /// __Default value:__ `0`
28273    #[serde(skip_serializing_if = "Option::is_none")]
28274    #[builder(default)]
28275    pub outer_radius: Option<CornerRadiusUnion>,
28276    #[serde(skip_serializing_if = "Option::is_none")]
28277    #[builder(default)]
28278    pub pad_angle: Option<CornerRadiusUnion>,
28279    /// For arc mark, the primary (outer) radius in pixels.
28280    ///
28281    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
28282    /// determined by the `x` and `y` properties.
28283    ///
28284    /// __Default value:__ `min(plot_width, plot_height)/2`
28285    #[serde(skip_serializing_if = "Option::is_none")]
28286    #[builder(default)]
28287    pub radius: Option<CornerRadiusUnion>,
28288    /// The secondary (inner) radius in pixels of arc marks.
28289    ///
28290    /// __Default value:__ `0`
28291    #[serde(skip_serializing_if = "Option::is_none")]
28292    #[builder(default)]
28293    pub radius2: Option<CornerRadiusUnion>,
28294    #[serde(skip_serializing_if = "Option::is_none")]
28295    #[builder(default)]
28296    pub shape: Option<Box<Color>>,
28297    /// Default size for marks.
28298    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
28299    /// this value sets the area of the symbol; the side lengths will increase with the square
28300    /// root of this value.
28301    /// - For `bar`, this represents the band size of the bar, in pixels.
28302    /// - For `text`, this represents the font size, in pixels.
28303    ///
28304    /// __Default value:__
28305    /// - `30` for point, circle, square marks; width/height's `step`
28306    /// - `2` for bar marks with discrete dimensions;
28307    /// - `5` for bar marks with continuous dimensions;
28308    /// - `11` for text marks.
28309    #[serde(skip_serializing_if = "Option::is_none")]
28310    #[builder(default)]
28311    pub size: Option<CornerRadiusUnion>,
28312    #[serde(skip_serializing_if = "Option::is_none")]
28313    #[builder(default)]
28314    pub smooth: Option<Aria>,
28315    #[serde(skip_serializing_if = "Option::is_none")]
28316    #[builder(default)]
28317    pub start_angle: Option<CornerRadiusUnion>,
28318    /// Default stroke color. This property has higher precedence than `config.color`. Set to
28319    /// `null` to remove stroke.
28320    ///
28321    /// __Default value:__ (None)
28322    #[serde(skip_serializing_if = "Option::is_none")]
28323    #[builder(default)]
28324    pub stroke: Option<MarkConfigFill>,
28325    #[serde(skip_serializing_if = "Option::is_none")]
28326    #[builder(default)]
28327    pub stroke_cap: Option<Cap>,
28328    #[serde(skip_serializing_if = "Option::is_none")]
28329    #[builder(default)]
28330    pub stroke_dash: Option<StrokeDashUnion>,
28331    #[serde(skip_serializing_if = "Option::is_none")]
28332    #[builder(default)]
28333    pub stroke_dash_offset: Option<CornerRadiusUnion>,
28334    #[serde(skip_serializing_if = "Option::is_none")]
28335    #[builder(default)]
28336    pub stroke_join: Option<StrokeJoinUnion>,
28337    #[serde(skip_serializing_if = "Option::is_none")]
28338    #[builder(default)]
28339    pub stroke_miter_limit: Option<CornerRadiusUnion>,
28340    #[serde(skip_serializing_if = "Option::is_none")]
28341    #[builder(default)]
28342    pub stroke_offset: Option<CornerRadiusUnion>,
28343    #[serde(skip_serializing_if = "Option::is_none")]
28344    #[builder(default)]
28345    pub stroke_opacity: Option<Opacity>,
28346    #[serde(skip_serializing_if = "Option::is_none")]
28347    #[builder(default)]
28348    pub stroke_width: Option<FontSize>,
28349    #[serde(skip_serializing_if = "Option::is_none")]
28350    #[builder(default)]
28351    pub tension: Option<CornerRadiusUnion>,
28352    /// Text-Specific Config
28353    #[serde(skip_serializing_if = "Option::is_none")]
28354    #[builder(default)]
28355    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
28356    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
28357    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
28358    /// clockwise.)
28359    ///
28360    /// - For text marks, polar coordinate angle in radians.
28361    #[serde(skip_serializing_if = "Option::is_none")]
28362    #[builder(default)]
28363    pub theta: Option<CornerRadiusUnion>,
28364    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
28365    /// values proceed clockwise.
28366    #[serde(skip_serializing_if = "Option::is_none")]
28367    #[builder(default)]
28368    pub theta2: Option<CornerRadiusUnion>,
28369    #[serde(skip_serializing_if = "Option::is_none")]
28370    #[builder(default)]
28371    pub time: Option<CornerRadiusUnion>,
28372    /// Default relative band position for a time unit. If set to `0`, the marks will be
28373    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
28374    /// be positioned in the middle of the time unit band step.
28375    #[serde(skip_serializing_if = "Option::is_none")]
28376    #[builder(default)]
28377    pub time_unit_band_position: Option<f64>,
28378    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
28379    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
28380    /// half of the time unit band step.
28381    #[serde(skip_serializing_if = "Option::is_none")]
28382    #[builder(default)]
28383    pub time_unit_band_size: Option<f64>,
28384    /// The tooltip text string to show upon mouse hover or an object defining which fields
28385    /// should the tooltip be derived from.
28386    ///
28387    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
28388    /// will be used.
28389    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
28390    /// data point will be used.
28391    /// - If set to `null` or `false`, then no tooltip will be used.
28392    ///
28393    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
28394    /// a detailed discussion about tooltip  in Vega-Lite.
28395    ///
28396    /// __Default value:__ `null`
28397    #[serde(skip_serializing_if = "Option::is_none")]
28398    #[builder(default)]
28399    pub tooltip: Option<OverlayMarkDefTooltip>,
28400    #[serde(skip_serializing_if = "Option::is_none")]
28401    #[builder(default)]
28402    pub url: Option<Box<Color>>,
28403    #[serde(skip_serializing_if = "Option::is_none")]
28404    #[builder(default)]
28405    pub width: Option<CornerRadiusUnion>,
28406    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
28407    /// `x2` or `width`.
28408    ///
28409    /// The `value` of this channel can be a number or a string `"width"` for the width of the
28410    /// plot.
28411    #[serde(skip_serializing_if = "Option::is_none")]
28412    #[builder(default)]
28413    pub x: Option<XUnion>,
28414    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
28415    ///
28416    /// The `value` of this channel can be a number or a string `"width"` for the width of the
28417    /// plot.
28418    #[serde(skip_serializing_if = "Option::is_none")]
28419    #[builder(default)]
28420    pub x2: Option<XUnion>,
28421    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
28422    /// `y2` or `height`.
28423    ///
28424    /// The `value` of this channel can be a number or a string `"height"` for the height of the
28425    /// plot.
28426    #[serde(skip_serializing_if = "Option::is_none")]
28427    #[builder(default)]
28428    pub y: Option<YUnion>,
28429    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
28430    ///
28431    /// The `value` of this channel can be a number or a string `"height"` for the height of the
28432    /// plot.
28433    #[serde(skip_serializing_if = "Option::is_none")]
28434    #[builder(default)]
28435    pub y2: Option<YUnion>,
28436    /// A flag for overlaying line on top of area marks, or an object defining the properties of
28437    /// the overlayed lines.
28438    ///
28439    /// - If this value is an empty object (`{}`) or `true`, lines with default properties will
28440    /// be used.
28441    ///
28442    /// - If this value is `false`, no lines would be automatically added to area marks.
28443    ///
28444    /// __Default value:__ `false`.
28445    ///
28446    /// Line-Specific Config
28447    #[serde(skip_serializing_if = "Option::is_none")]
28448    #[builder(default)]
28449    pub line: Option<Line>,
28450    /// A flag for overlaying points on top of line or area marks, or an object defining the
28451    /// properties of the overlayed points.
28452    ///
28453    /// - If this property is `"transparent"`, transparent points will be used (for enhancing
28454    /// tooltips and selections).
28455    ///
28456    /// - If this property is an empty object (`{}`) or `true`, filled points with default
28457    /// properties will be used.
28458    ///
28459    /// - If this property is `false`, no points would be automatically added to line or area
28460    /// marks.
28461    ///
28462    /// __Default value:__ `false`.
28463    ///
28464    /// Point-Specific Config
28465    #[serde(skip_serializing_if = "Option::is_none")]
28466    #[builder(default)]
28467    pub point: Option<PointUnion>,
28468    /// - For vertical bars, top-left and top-right corner radius.
28469    ///
28470    /// - For horizontal bars, top-right and bottom-right corner radius.
28471    #[serde(skip_serializing_if = "Option::is_none")]
28472    #[builder(default)]
28473    pub corner_radius_end: Option<CornerRadiusUnion>,
28474    /// The width of the ticks.
28475    ///
28476    /// __Default value:__  3/4 of step (width step for horizontal ticks and height step for
28477    /// vertical ticks).
28478    #[serde(skip_serializing_if = "Option::is_none")]
28479    #[builder(default)]
28480    pub band_size: Option<f64>,
28481    /// Thickness of the tick mark.
28482    ///
28483    /// __Default value:__  `1`
28484    #[serde(skip_serializing_if = "Option::is_none")]
28485    #[builder(default)]
28486    pub thickness: Option<f64>,
28487    #[serde(skip_serializing_if = "Option::is_none")]
28488    #[builder(default)]
28489    pub band_position: Option<CornerRadiusUnion>,
28490    /// A boolean flag indicating if the domain (the axis baseline) should be included as part of
28491    /// the axis.
28492    ///
28493    /// __Default value:__ `true`
28494    #[serde(skip_serializing_if = "Option::is_none")]
28495    #[builder(default)]
28496    pub domain: Option<bool>,
28497    #[serde(skip_serializing_if = "Option::is_none")]
28498    #[builder(default)]
28499    pub domain_cap: Option<Cap>,
28500    #[serde(skip_serializing_if = "Option::is_none")]
28501    #[builder(default)]
28502    pub domain_color: Option<Box<Color>>,
28503    #[serde(skip_serializing_if = "Option::is_none")]
28504    #[builder(default)]
28505    pub domain_dash: Option<StrokeDashUnion>,
28506    #[serde(skip_serializing_if = "Option::is_none")]
28507    #[builder(default)]
28508    pub domain_dash_offset: Option<CornerRadiusUnion>,
28509    #[serde(skip_serializing_if = "Option::is_none")]
28510    #[builder(default)]
28511    pub domain_opacity: Option<CornerRadiusUnion>,
28512    #[serde(skip_serializing_if = "Option::is_none")]
28513    #[builder(default)]
28514    pub domain_width: Option<CornerRadiusUnion>,
28515    /// When used with the default `"number"` and `"time"` format type, the text formatting
28516    /// pattern for labels of guides (axes, legends, headers) and text marks.
28517    ///
28518    /// - If the format type is `"number"` (e.g., for quantitative fields), this is D3's [number
28519    /// format pattern](https://github.com/d3/d3-format#locale_format).
28520    /// - If the format type is `"time"` (e.g., for temporal fields), this is D3's [time format
28521    /// pattern](https://github.com/d3/d3-time-format#locale_format).
28522    ///
28523    /// See the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for
28524    /// more examples.
28525    ///
28526    /// When used with a [custom
28527    /// `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this
28528    /// value will be passed as `format` alongside `datum.value` to the registered function.
28529    ///
28530    /// __Default value:__  Derived from
28531    /// [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for
28532    /// number format and from
28533    /// [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time
28534    /// format.
28535    #[serde(skip_serializing_if = "Option::is_none")]
28536    #[builder(default)]
28537    pub format: Option<Format>,
28538    /// The format type for labels. One of `"number"`, `"time"`, or a [registered custom format
28539    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).
28540    ///
28541    /// __Default value:__
28542    /// - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`.
28543    /// - `"number"` for quantitative fields as well as ordinal and nominal fields without
28544    /// `timeUnit`.
28545    #[serde(skip_serializing_if = "Option::is_none")]
28546    #[builder(default)]
28547    pub format_type: Option<String>,
28548    /// A boolean flag indicating if grid lines should be included as part of the axis
28549    ///
28550    /// __Default value:__ `true` for [continuous
28551    /// scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned;
28552    /// otherwise, `false`.
28553    #[serde(skip_serializing_if = "Option::is_none")]
28554    #[builder(default)]
28555    pub grid: Option<bool>,
28556    #[serde(skip_serializing_if = "Option::is_none")]
28557    #[builder(default)]
28558    pub grid_cap: Option<Cap>,
28559    #[serde(skip_serializing_if = "Option::is_none")]
28560    #[builder(default)]
28561    pub grid_color: Option<GridColorUnion>,
28562    #[serde(skip_serializing_if = "Option::is_none")]
28563    #[builder(default)]
28564    pub grid_dash: Option<AxisGridDash>,
28565    #[serde(skip_serializing_if = "Option::is_none")]
28566    #[builder(default)]
28567    pub grid_dash_offset: Option<GridDashOffsetUnion>,
28568    #[serde(skip_serializing_if = "Option::is_none")]
28569    #[builder(default)]
28570    pub grid_opacity: Option<GridOpacityUnion>,
28571    #[serde(skip_serializing_if = "Option::is_none")]
28572    #[builder(default)]
28573    pub grid_width: Option<GridWidthUnion>,
28574    #[serde(skip_serializing_if = "Option::is_none")]
28575    #[builder(default)]
28576    pub label_align: Option<ConditionalAxisPropertyAlignNull>,
28577    #[serde(skip_serializing_if = "Option::is_none")]
28578    #[builder(default)]
28579    pub label_angle: Option<LabelAngle>,
28580    #[serde(skip_serializing_if = "Option::is_none")]
28581    #[builder(default)]
28582    pub label_baseline: Option<PurpleTextBaseline>,
28583    #[serde(skip_serializing_if = "Option::is_none")]
28584    #[builder(default)]
28585    pub label_bound: Option<Label>,
28586    #[serde(skip_serializing_if = "Option::is_none")]
28587    #[builder(default)]
28588    pub label_color: Option<GridColorUnion>,
28589    /// [Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.
28590    ///
28591    /// __Note:__ The label text and value can be assessed via the `label` and `value` properties
28592    /// of the axis's backing `datum` object.
28593    #[serde(skip_serializing_if = "Option::is_none")]
28594    #[builder(default)]
28595    pub label_expr: Option<String>,
28596    /// Indicates if the first and last axis labels should be aligned flush with the scale range.
28597    /// Flush alignment for a horizontal axis will left-align the first label and right-align the
28598    /// last label. For vertical axes, bottom and top text baselines are applied instead. If this
28599    /// property is a number, it also indicates the number of pixels by which to offset the first
28600    /// and last labels; for example, a value of 2 will flush-align the first and last labels and
28601    /// also push them 2 pixels outward from the center of the axis. The additional adjustment
28602    /// can sometimes help the labels better visually group with corresponding axis ticks.
28603    ///
28604    /// __Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.
28605    #[serde(skip_serializing_if = "Option::is_none")]
28606    #[builder(default)]
28607    pub label_flush: Option<LabelFlush>,
28608    #[serde(skip_serializing_if = "Option::is_none")]
28609    #[builder(default)]
28610    pub label_flush_offset: Option<CornerRadiusUnion>,
28611    #[serde(skip_serializing_if = "Option::is_none")]
28612    #[builder(default)]
28613    pub label_font: Option<ConditionalAxisPropertyStringNull>,
28614    #[serde(skip_serializing_if = "Option::is_none")]
28615    #[builder(default)]
28616    pub label_font_size: Option<GridWidthUnion>,
28617    #[serde(skip_serializing_if = "Option::is_none")]
28618    #[builder(default)]
28619    pub label_font_style: Option<ConditionalAxisPropertyFontStyleNull>,
28620    #[serde(skip_serializing_if = "Option::is_none")]
28621    #[builder(default)]
28622    pub label_font_weight: Option<FontWeight>,
28623    #[serde(skip_serializing_if = "Option::is_none")]
28624    #[builder(default)]
28625    pub label_limit: Option<CornerRadiusUnion>,
28626    #[serde(skip_serializing_if = "Option::is_none")]
28627    #[builder(default)]
28628    pub label_line_height: Option<CornerRadiusUnion>,
28629    #[serde(skip_serializing_if = "Option::is_none")]
28630    #[builder(default)]
28631    pub label_offset: Option<GridDashOffsetUnion>,
28632    #[serde(skip_serializing_if = "Option::is_none")]
28633    #[builder(default)]
28634    pub label_opacity: Option<GridDashOffsetUnion>,
28635    /// The strategy to use for resolving overlap of axis labels. If `false` (the default), no
28636    /// overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing
28637    /// every other label is used (this works well for standard linear axes). If set to
28638    /// `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps
28639    /// with the last visible label (this often works better for log-scaled axes).
28640    ///
28641    /// __Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log
28642    /// scales; otherwise `false`.
28643    #[serde(skip_serializing_if = "Option::is_none")]
28644    #[builder(default)]
28645    pub label_overlap: Option<LabelOverlapUnion>,
28646    #[serde(skip_serializing_if = "Option::is_none")]
28647    #[builder(default)]
28648    pub label_padding: Option<GridDashOffsetUnion>,
28649    /// A boolean flag indicating if labels should be included as part of the axis.
28650    ///
28651    /// __Default value:__ `true`.
28652    #[serde(skip_serializing_if = "Option::is_none")]
28653    #[builder(default)]
28654    pub labels: Option<bool>,
28655    #[serde(skip_serializing_if = "Option::is_none")]
28656    #[builder(default)]
28657    pub label_separation: Option<CornerRadiusUnion>,
28658    #[serde(skip_serializing_if = "Option::is_none")]
28659    #[builder(default)]
28660    pub max_extent: Option<CornerRadiusUnion>,
28661    #[serde(skip_serializing_if = "Option::is_none")]
28662    #[builder(default)]
28663    pub min_extent: Option<CornerRadiusUnion>,
28664    /// The offset, in pixels, by which to displace the axis from the edge of the enclosing group
28665    /// or data rectangle.
28666    ///
28667    /// __Default value:__ derived from the [axis
28668    /// config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset`
28669    /// (`0` by default)
28670    #[serde(skip_serializing_if = "Option::is_none")]
28671    #[builder(default)]
28672    pub offset: Option<CornerRadiusUnion>,
28673    /// The anchor position of the axis in pixels. For x-axes with top or bottom orientation,
28674    /// this sets the axis group x coordinate. For y-axes with left or right orientation, this
28675    /// sets the axis group y coordinate.
28676    ///
28677    /// __Default value__: `0`
28678    #[serde(skip_serializing_if = "Option::is_none")]
28679    #[builder(default)]
28680    pub position: Option<CornerRadiusUnion>,
28681    /// A string or array of strings indicating the name of custom styles to apply to the axis. A
28682    /// style is a named collection of axis property defined within the [style
28683    /// configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is
28684    /// an array, later styles will override earlier styles.
28685    ///
28686    /// __Default value:__ (none) __Note:__ Any specified style will augment the default style.
28687    /// For example, an x-axis mark with `"style": "foo"` will use `config.axisX` and
28688    /// `config.style.foo` (the specified style `"foo"` has higher precedence).
28689    #[serde(skip_serializing_if = "Option::is_none")]
28690    #[builder(default)]
28691    pub style: Option<LegendText>,
28692    #[serde(skip_serializing_if = "Option::is_none")]
28693    #[builder(default)]
28694    pub tick_band: Option<TickBandUnion>,
28695    #[serde(skip_serializing_if = "Option::is_none")]
28696    #[builder(default)]
28697    pub tick_cap: Option<Cap>,
28698    #[serde(skip_serializing_if = "Option::is_none")]
28699    #[builder(default)]
28700    pub tick_color: Option<GridColorUnion>,
28701    /// A desired number of ticks, for axes visualizing quantitative scales. The resulting number
28702    /// may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the
28703    /// underlying scale's range.
28704    ///
28705    /// For scales of type `"time"` or `"utc"`, the tick count can instead be a time interval
28706    /// specifier. Legal string values are `"millisecond"`, `"second"`, `"minute"`, `"hour"`,
28707    /// `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, an object-valued interval
28708    /// specifier of the form `{"interval": "month", "step": 3}` includes a desired number of
28709    /// interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct)
28710    /// boundary.
28711    ///
28712    /// __Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)`
28713    /// for y.
28714    #[serde(skip_serializing_if = "Option::is_none")]
28715    #[builder(default)]
28716    pub tick_count: Option<TickCount>,
28717    #[serde(skip_serializing_if = "Option::is_none")]
28718    #[builder(default)]
28719    pub tick_dash: Option<AxisTickDash>,
28720    #[serde(skip_serializing_if = "Option::is_none")]
28721    #[builder(default)]
28722    pub tick_dash_offset: Option<GridDashOffsetUnion>,
28723    /// Boolean flag indicating if an extra axis tick should be added for the initial position of
28724    /// the axis. This flag is useful for styling axes for `band` scales such that ticks are
28725    /// placed on band boundaries rather in the middle of a band. Use in conjunction with
28726    /// `"bandPosition": 1` and an axis `"padding"` value of `0`.
28727    #[serde(skip_serializing_if = "Option::is_none")]
28728    #[builder(default)]
28729    pub tick_extra: Option<bool>,
28730    /// The minimum desired step between axis ticks, in terms of scale domain values. For
28731    /// example, a value of `1` indicates that ticks should not be less than 1 unit apart. If
28732    /// `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to
28733    /// enforce the minimum step value.
28734    #[serde(skip_serializing_if = "Option::is_none")]
28735    #[builder(default)]
28736    pub tick_min_step: Option<CornerRadiusUnion>,
28737    #[serde(skip_serializing_if = "Option::is_none")]
28738    #[builder(default)]
28739    pub tick_offset: Option<CornerRadiusUnion>,
28740    #[serde(skip_serializing_if = "Option::is_none")]
28741    #[builder(default)]
28742    pub tick_opacity: Option<GridDashOffsetUnion>,
28743    /// Boolean flag indicating if pixel position values should be rounded to the nearest
28744    /// integer.
28745    ///
28746    /// __Default value:__ `true`
28747    #[serde(skip_serializing_if = "Option::is_none")]
28748    #[builder(default)]
28749    pub tick_round: Option<bool>,
28750    /// Boolean value that determines whether the axis should include ticks.
28751    ///
28752    /// __Default value:__ `true`
28753    #[serde(skip_serializing_if = "Option::is_none")]
28754    #[builder(default)]
28755    pub ticks: Option<bool>,
28756    #[serde(skip_serializing_if = "Option::is_none")]
28757    #[builder(default)]
28758    pub tick_size: Option<GridWidthUnion>,
28759    #[serde(skip_serializing_if = "Option::is_none")]
28760    #[builder(default)]
28761    pub tick_width: Option<GridWidthUnion>,
28762    /// A title for the field. If `null`, the title will be removed.
28763    ///
28764    /// __Default value:__  derived from the field's name and transformation function
28765    /// (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function
28766    /// is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or
28767    /// has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit
28768    /// (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field
28769    /// name.
28770    ///
28771    /// __Notes__:
28772    ///
28773    /// 1) You can customize the default field title format by providing the
28774    /// [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config)
28775    /// property in the [config](https://vega.github.io/vega-lite/docs/config.html) or
28776    /// [`fieldTitle` function via the `compile` function's
28777    /// options](https://vega.github.io/vega-lite/usage/compile.html#field-title).
28778    ///
28779    /// 2) If both field definition's `title` and axis, header, or legend `title` are defined,
28780    /// axis/header/legend title will be used.
28781    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
28782    #[builder(default)]
28783    pub title: RemovableValue<LegendText>,
28784    #[serde(skip_serializing_if = "Option::is_none")]
28785    #[builder(default)]
28786    pub title_align: Option<TitleAlignUnion>,
28787    #[serde(skip_serializing_if = "Option::is_none")]
28788    #[builder(default)]
28789    pub title_anchor: Option<TitleAnchorUnion>,
28790    #[serde(skip_serializing_if = "Option::is_none")]
28791    #[builder(default)]
28792    pub title_angle: Option<CornerRadiusUnion>,
28793    #[serde(skip_serializing_if = "Option::is_none")]
28794    #[builder(default)]
28795    pub title_baseline: Option<TextBaseline>,
28796    #[serde(skip_serializing_if = "Option::is_none")]
28797    #[builder(default)]
28798    pub title_color: Option<Box<Color>>,
28799    #[serde(skip_serializing_if = "Option::is_none")]
28800    #[builder(default)]
28801    pub title_font: Option<Box<Color>>,
28802    #[serde(skip_serializing_if = "Option::is_none")]
28803    #[builder(default)]
28804    pub title_font_size: Option<FontSize>,
28805    #[serde(skip_serializing_if = "Option::is_none")]
28806    #[builder(default)]
28807    pub title_font_style: Option<Box<Color>>,
28808    #[serde(skip_serializing_if = "Option::is_none")]
28809    #[builder(default)]
28810    pub title_font_weight: Option<FontWeightUnion>,
28811    #[serde(skip_serializing_if = "Option::is_none")]
28812    #[builder(default)]
28813    pub title_limit: Option<FontSize>,
28814    #[serde(skip_serializing_if = "Option::is_none")]
28815    #[builder(default)]
28816    pub title_line_height: Option<CornerRadiusUnion>,
28817    #[serde(skip_serializing_if = "Option::is_none")]
28818    #[builder(default)]
28819    pub title_opacity: Option<CornerRadiusUnion>,
28820    #[serde(skip_serializing_if = "Option::is_none")]
28821    #[builder(default)]
28822    pub title_padding: Option<CornerRadiusUnion>,
28823    #[serde(skip_serializing_if = "Option::is_none")]
28824    #[builder(default)]
28825    pub title_x: Option<CornerRadiusUnion>,
28826    #[serde(skip_serializing_if = "Option::is_none")]
28827    #[builder(default)]
28828    pub title_y: Option<CornerRadiusUnion>,
28829    #[serde(skip_serializing_if = "Option::is_none")]
28830    #[builder(default)]
28831    pub translate: Option<CornerRadiusUnion>,
28832    /// Explicitly set the visible axis tick values.
28833    #[serde(skip_serializing_if = "Option::is_none")]
28834    #[builder(default)]
28835    pub values: Option<Values>,
28836    /// A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be
28837    /// drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.
28838    ///
28839    /// __Default value:__ `0` (behind the marks).
28840    #[serde(skip_serializing_if = "Option::is_none")]
28841    #[builder(default)]
28842    pub zindex: Option<f64>,
28843}
28844
28845#[derive(Debug, Clone, Serialize, Deserialize)]
28846#[serde(untagged)]
28847#[derive(From)]
28848pub enum StyleOrient {
28849    BackgroundExprRef(BackgroundExprRef),
28850    Enum(AxisOrient),
28851}
28852
28853/// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
28854/// horizontal (default) or vertical.
28855/// - For bar, rule and tick, this determines whether the size of the bar and tick should be
28856/// applied to x or y dimension.
28857/// - For area, this property determines the orient property of the Vega output.
28858/// - For line and trail marks, this property determines the sort order of the points in the
28859/// line if `config.sortLineBy` is not specified. For stacked charts, this is always
28860/// determined by the orientation of the stack; therefore explicitly specified value will be
28861/// ignored.
28862///
28863/// The direction of the legend, one of `"vertical"` or `"horizontal"`.
28864///
28865/// __Default value:__
28866/// - For top-/bottom-`orient`ed legends, `"horizontal"`
28867/// - For left-/right-`orient`ed legends, `"vertical"`
28868/// - For top/bottom-left/right-`orient`ed legends, `"horizontal"` for gradient legends and
28869/// `"vertical"` for symbol legends.
28870///
28871/// The default direction (`"horizontal"` or `"vertical"`) for gradient legends.
28872///
28873/// __Default value:__ `"vertical"`.
28874///
28875/// The default direction (`"horizontal"` or `"vertical"`) for symbol legends.
28876///
28877/// __Default value:__ `"vertical"`.
28878///
28879/// Orientation of the box plot. This is normally automatically determined based on types of
28880/// fields on x and y channels. However, an explicit `orient` be specified when the
28881/// orientation is ambiguous.
28882///
28883/// __Default value:__ `"vertical"`.
28884///
28885/// Orientation of the error bar. This is normally automatically determined, but can be
28886/// specified when the orientation is ambiguous and cannot be automatically determined.
28887///
28888/// Orientation of the error band. This is normally automatically determined, but can be
28889/// specified when the orientation is ambiguous and cannot be automatically determined.
28890#[derive(Debug, Clone, Serialize, Deserialize)]
28891#[serde(rename_all = "snake_case")]
28892pub enum AxisOrient {
28893    Bottom,
28894    Horizontal,
28895    Left,
28896    Right,
28897    Top,
28898    Vertical,
28899}
28900
28901/// Tick-Specific Config
28902#[derive(Debug, Clone, Serialize, Deserialize)]
28903#[serde(rename_all = "camelCase")]
28904#[derive(Default, Builder)]
28905#[builder(setter(into, strip_option))]
28906pub struct TickConfig {
28907    /// The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
28908    /// of `"left"`, `"right"`, `"center"`.
28909    ///
28910    /// __Note:__ Expression reference is *not* supported for range marks.
28911    #[serde(skip_serializing_if = "Option::is_none")]
28912    #[builder(default)]
28913    pub align: Option<TitleAlignUnion>,
28914    #[serde(skip_serializing_if = "Option::is_none")]
28915    #[builder(default)]
28916    pub angle: Option<Angle>,
28917    #[serde(skip_serializing_if = "Option::is_none")]
28918    #[builder(default)]
28919    pub aria: Option<Aria>,
28920    #[serde(skip_serializing_if = "Option::is_none")]
28921    #[builder(default)]
28922    pub aria_role: Option<Box<Color>>,
28923    #[serde(skip_serializing_if = "Option::is_none")]
28924    #[builder(default)]
28925    pub aria_role_description: Option<Box<Color>>,
28926    #[serde(skip_serializing_if = "Option::is_none")]
28927    #[builder(default)]
28928    pub aspect: Option<Aria>,
28929    /// The width of the ticks.
28930    ///
28931    /// __Default value:__  3/4 of step (width step for horizontal ticks and height step for
28932    /// vertical ticks).
28933    #[serde(skip_serializing_if = "Option::is_none")]
28934    #[builder(default)]
28935    pub band_size: Option<f64>,
28936    /// For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`,
28937    /// `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that
28938    /// provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate
28939    /// similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight`
28940    /// rather than `fontSize` alone.
28941    ///
28942    /// For range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`,
28943    /// `"bottom"`.
28944    ///
28945    /// __Note:__ Expression reference is *not* supported for range marks.
28946    #[serde(skip_serializing_if = "Option::is_none")]
28947    #[builder(default)]
28948    pub baseline: Option<TextBaseline>,
28949    /// Offset between bars for binned field. The ideal value for this is either 0 (preferred by
28950    /// statisticians) or 1 (Vega-Lite default, D3 example style).
28951    ///
28952    /// __Default value:__ `1`
28953    #[serde(skip_serializing_if = "Option::is_none")]
28954    #[builder(default)]
28955    pub bin_spacing: Option<f64>,
28956    #[serde(skip_serializing_if = "Option::is_none")]
28957    #[builder(default)]
28958    pub blend: Option<BlendUnion>,
28959    /// Default color.
28960    ///
28961    /// __Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`
28962    ///
28963    /// __Note:__
28964    /// - This property cannot be used in a [style
28965    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
28966    /// - The `fill` and `stroke` properties have higher precedence than `color` and will
28967    /// override `color`.
28968    #[serde(skip_serializing_if = "Option::is_none")]
28969    #[builder(default)]
28970    pub color: Option<MarkConfigColor>,
28971    /// The default size of the bars on continuous scales.
28972    ///
28973    /// __Default value:__ `5`
28974    #[serde(skip_serializing_if = "Option::is_none")]
28975    #[builder(default)]
28976    pub continuous_band_size: Option<f64>,
28977    #[serde(skip_serializing_if = "Option::is_none")]
28978    #[builder(default)]
28979    pub corner_radius: Option<CornerRadiusUnion>,
28980    #[serde(skip_serializing_if = "Option::is_none")]
28981    #[builder(default)]
28982    pub corner_radius_bottom_left: Option<CornerRadiusUnion>,
28983    #[serde(skip_serializing_if = "Option::is_none")]
28984    #[builder(default)]
28985    pub corner_radius_bottom_right: Option<CornerRadiusUnion>,
28986    #[serde(skip_serializing_if = "Option::is_none")]
28987    #[builder(default)]
28988    pub corner_radius_top_left: Option<CornerRadiusUnion>,
28989    #[serde(skip_serializing_if = "Option::is_none")]
28990    #[builder(default)]
28991    pub corner_radius_top_right: Option<CornerRadiusUnion>,
28992    #[serde(skip_serializing_if = "Option::is_none")]
28993    #[builder(default)]
28994    pub cursor: Option<CursorUnion>,
28995    #[serde(skip_serializing_if = "Option::is_none")]
28996    #[builder(default)]
28997    pub description: Option<Box<Color>>,
28998    #[serde(skip_serializing_if = "Option::is_none")]
28999    #[builder(default)]
29000    pub dir: Option<Dir>,
29001    /// The default size of the bars with discrete dimensions. If unspecified, the default size
29002    /// is  `step-2`, which provides 2 pixel offset between bars.
29003    #[serde(skip_serializing_if = "Option::is_none")]
29004    #[builder(default)]
29005    pub discrete_band_size: Option<DiscreteBandSize>,
29006    #[serde(skip_serializing_if = "Option::is_none")]
29007    #[builder(default)]
29008    pub dx: Option<CornerRadiusUnion>,
29009    #[serde(skip_serializing_if = "Option::is_none")]
29010    #[builder(default)]
29011    pub dy: Option<CornerRadiusUnion>,
29012    #[serde(skip_serializing_if = "Option::is_none")]
29013    #[builder(default)]
29014    pub ellipsis: Option<Box<Color>>,
29015    #[serde(skip_serializing_if = "Option::is_none")]
29016    #[builder(default)]
29017    pub end_angle: Option<CornerRadiusUnion>,
29018    /// Default fill color. This property has higher precedence than `config.color`. Set to
29019    /// `null` to remove fill.
29020    ///
29021    /// __Default value:__ (None)
29022    #[serde(skip_serializing_if = "Option::is_none")]
29023    #[builder(default)]
29024    pub fill: Option<MarkConfigFill>,
29025    /// Whether the mark's color should be used as fill color instead of stroke color.
29026    ///
29027    /// __Default value:__ `false` for all `point`, `line`, and `rule` marks as well as
29028    /// `geoshape` marks for
29029    /// [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources;
29030    /// otherwise, `true`.
29031    ///
29032    /// __Note:__ This property cannot be used in a [style
29033    /// config](https://vega.github.io/vega-lite/docs/mark.html#style-config).
29034    #[serde(skip_serializing_if = "Option::is_none")]
29035    #[builder(default)]
29036    pub filled: Option<bool>,
29037    #[serde(skip_serializing_if = "Option::is_none")]
29038    #[builder(default)]
29039    pub fill_opacity: Option<Opacity>,
29040    #[serde(skip_serializing_if = "Option::is_none")]
29041    #[builder(default)]
29042    pub font: Option<Box<Color>>,
29043    #[serde(skip_serializing_if = "Option::is_none")]
29044    #[builder(default)]
29045    pub font_size: Option<FontSize>,
29046    #[serde(skip_serializing_if = "Option::is_none")]
29047    #[builder(default)]
29048    pub font_style: Option<Box<Color>>,
29049    #[serde(skip_serializing_if = "Option::is_none")]
29050    #[builder(default)]
29051    pub font_weight: Option<FontWeightUnion>,
29052    #[serde(skip_serializing_if = "Option::is_none")]
29053    #[builder(default)]
29054    pub height: Option<CornerRadiusUnion>,
29055    #[serde(skip_serializing_if = "Option::is_none")]
29056    #[builder(default)]
29057    pub href: Option<Box<Color>>,
29058    /// The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.
29059    ///
29060    /// __Default value:__ `0`
29061    #[serde(skip_serializing_if = "Option::is_none")]
29062    #[builder(default)]
29063    pub inner_radius: Option<CornerRadiusUnion>,
29064    #[serde(skip_serializing_if = "Option::is_none")]
29065    #[builder(default)]
29066    pub interpolate: Option<MarkConfigInterpolate>,
29067    /// Invalid data mode, which defines how the marks and corresponding scales should represent
29068    /// invalid values (`null` and `NaN` in continuous scales *without* defined output for
29069    /// invalid values).
29070    ///
29071    /// - `"filter"` — *Exclude* all invalid values from the visualization's *marks* and
29072    /// *scales*. For path marks (for line, area, trail), this option will create paths that
29073    /// connect valid points, as if the data rows with invalid values do not exist.
29074    ///
29075    /// - `"break-paths-filter-domains"` — Break path marks (for line, area, trail) at invalid
29076    /// values.  For non-path marks, this is equivalent to `"filter"`. All *scale* domains will
29077    /// *exclude* these filtered data points.
29078    ///
29079    /// - `"break-paths-show-domains"` — Break paths (for line, area, trail) at invalid values.
29080    /// Hide invalid values for non-path marks. All *scale* domains will *include* these filtered
29081    /// data points (for both path and non-path marks).
29082    ///
29083    /// - `"show"` or `null` — Show all data points in the marks and scale domains. Each scale
29084    /// will use the output for invalid values defined in `config.scale.invalid` or, if
29085    /// unspecified, by default invalid values will produce the same visual values as zero (if
29086    /// the scale includes zero) or the minimum value (if the scale does not include zero).
29087    ///
29088    /// - `"break-paths-show-path-domains"` (default) — This is equivalent to
29089    /// `"break-paths-show-domains"` for path-based marks (line/area/trail) and `"filter"` for
29090    /// non-path marks.
29091    ///
29092    /// __Note__: If any channel's scale has an output for invalid values defined in
29093    /// `config.scale.invalid`, all values for the scales will be considered "valid" since they
29094    /// can produce a reasonable output for the scales. Thus, fields for such channels will not
29095    /// be filtered and will not cause path breaks.
29096    #[serde(skip_serializing_if = "Option::is_none")]
29097    #[builder(default)]
29098    pub invalid: Option<MarkInvalidDataMode>,
29099    #[serde(skip_serializing_if = "Option::is_none")]
29100    #[builder(default)]
29101    pub limit: Option<CornerRadiusUnion>,
29102    #[serde(skip_serializing_if = "Option::is_none")]
29103    #[builder(default)]
29104    pub line_break: Option<Box<Color>>,
29105    #[serde(skip_serializing_if = "Option::is_none")]
29106    #[builder(default)]
29107    pub line_height: Option<CornerRadiusUnion>,
29108    /// The minimum band size for bar and rectangle marks. __Default value:__ `0.25`
29109    #[serde(skip_serializing_if = "Option::is_none")]
29110    #[builder(default)]
29111    pub min_band_size: Option<CornerRadiusUnion>,
29112    /// The overall opacity (value between [0,1]).
29113    ///
29114    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
29115    /// `square` marks or layered `bar` charts and `1` otherwise.
29116    #[serde(skip_serializing_if = "Option::is_none")]
29117    #[builder(default)]
29118    pub opacity: Option<CornerRadiusUnion>,
29119    /// For line and trail marks, this `order` property can be set to `null` or `false` to make
29120    /// the lines use the original order in the data sources.
29121    #[serde(skip_serializing_if = "Option::is_none")]
29122    #[builder(default)]
29123    pub order: Option<bool>,
29124    /// The orientation of a non-stacked bar, tick, area, and line charts. The value is either
29125    /// horizontal (default) or vertical.
29126    /// - For bar, rule and tick, this determines whether the size of the bar and tick should be
29127    /// applied to x or y dimension.
29128    /// - For area, this property determines the orient property of the Vega output.
29129    /// - For line and trail marks, this property determines the sort order of the points in the
29130    /// line if `config.sortLineBy` is not specified. For stacked charts, this is always
29131    /// determined by the orientation of the stack; therefore explicitly specified value will be
29132    /// ignored.
29133    #[serde(skip_serializing_if = "Option::is_none")]
29134    #[builder(default)]
29135    pub orient: Option<Orientation>,
29136    /// The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.
29137    ///
29138    /// __Default value:__ `0`
29139    #[serde(skip_serializing_if = "Option::is_none")]
29140    #[builder(default)]
29141    pub outer_radius: Option<CornerRadiusUnion>,
29142    #[serde(skip_serializing_if = "Option::is_none")]
29143    #[builder(default)]
29144    pub pad_angle: Option<CornerRadiusUnion>,
29145    /// For arc mark, the primary (outer) radius in pixels.
29146    ///
29147    /// For text marks, polar coordinate radial offset, in pixels, of the text from the origin
29148    /// determined by the `x` and `y` properties.
29149    ///
29150    /// __Default value:__ `min(plot_width, plot_height)/2`
29151    #[serde(skip_serializing_if = "Option::is_none")]
29152    #[builder(default)]
29153    pub radius: Option<CornerRadiusUnion>,
29154    /// The secondary (inner) radius in pixels of arc marks.
29155    ///
29156    /// __Default value:__ `0`
29157    #[serde(skip_serializing_if = "Option::is_none")]
29158    #[builder(default)]
29159    pub radius2: Option<CornerRadiusUnion>,
29160    #[serde(skip_serializing_if = "Option::is_none")]
29161    #[builder(default)]
29162    pub shape: Option<Box<Color>>,
29163    /// Default size for marks.
29164    /// - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that
29165    /// this value sets the area of the symbol; the side lengths will increase with the square
29166    /// root of this value.
29167    /// - For `bar`, this represents the band size of the bar, in pixels.
29168    /// - For `text`, this represents the font size, in pixels.
29169    ///
29170    /// __Default value:__
29171    /// - `30` for point, circle, square marks; width/height's `step`
29172    /// - `2` for bar marks with discrete dimensions;
29173    /// - `5` for bar marks with continuous dimensions;
29174    /// - `11` for text marks.
29175    #[serde(skip_serializing_if = "Option::is_none")]
29176    #[builder(default)]
29177    pub size: Option<CornerRadiusUnion>,
29178    #[serde(skip_serializing_if = "Option::is_none")]
29179    #[builder(default)]
29180    pub smooth: Option<Aria>,
29181    #[serde(skip_serializing_if = "Option::is_none")]
29182    #[builder(default)]
29183    pub start_angle: Option<CornerRadiusUnion>,
29184    /// Default stroke color. This property has higher precedence than `config.color`. Set to
29185    /// `null` to remove stroke.
29186    ///
29187    /// __Default value:__ (None)
29188    #[serde(skip_serializing_if = "Option::is_none")]
29189    #[builder(default)]
29190    pub stroke: Option<MarkConfigFill>,
29191    #[serde(skip_serializing_if = "Option::is_none")]
29192    #[builder(default)]
29193    pub stroke_cap: Option<Cap>,
29194    #[serde(skip_serializing_if = "Option::is_none")]
29195    #[builder(default)]
29196    pub stroke_dash: Option<StrokeDashUnion>,
29197    #[serde(skip_serializing_if = "Option::is_none")]
29198    #[builder(default)]
29199    pub stroke_dash_offset: Option<CornerRadiusUnion>,
29200    #[serde(skip_serializing_if = "Option::is_none")]
29201    #[builder(default)]
29202    pub stroke_join: Option<StrokeJoinUnion>,
29203    #[serde(skip_serializing_if = "Option::is_none")]
29204    #[builder(default)]
29205    pub stroke_miter_limit: Option<CornerRadiusUnion>,
29206    #[serde(skip_serializing_if = "Option::is_none")]
29207    #[builder(default)]
29208    pub stroke_offset: Option<CornerRadiusUnion>,
29209    #[serde(skip_serializing_if = "Option::is_none")]
29210    #[builder(default)]
29211    pub stroke_opacity: Option<Opacity>,
29212    #[serde(skip_serializing_if = "Option::is_none")]
29213    #[builder(default)]
29214    pub stroke_width: Option<FontSize>,
29215    #[serde(skip_serializing_if = "Option::is_none")]
29216    #[builder(default)]
29217    pub tension: Option<CornerRadiusUnion>,
29218    #[serde(skip_serializing_if = "Option::is_none")]
29219    #[builder(default)]
29220    pub text: Option<ConditionalPredicateValueDefTextExprRefText>,
29221    /// - For arc marks, the arc length in radians if theta2 is not specified, otherwise the
29222    /// start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
29223    /// clockwise.)
29224    ///
29225    /// - For text marks, polar coordinate angle in radians.
29226    #[serde(skip_serializing_if = "Option::is_none")]
29227    #[builder(default)]
29228    pub theta: Option<CornerRadiusUnion>,
29229    /// The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing
29230    /// values proceed clockwise.
29231    #[serde(skip_serializing_if = "Option::is_none")]
29232    #[builder(default)]
29233    pub theta2: Option<CornerRadiusUnion>,
29234    /// Thickness of the tick mark.
29235    ///
29236    /// __Default value:__  `1`
29237    #[serde(skip_serializing_if = "Option::is_none")]
29238    #[builder(default)]
29239    pub thickness: Option<f64>,
29240    #[serde(skip_serializing_if = "Option::is_none")]
29241    #[builder(default)]
29242    pub time: Option<CornerRadiusUnion>,
29243    /// Default relative band position for a time unit. If set to `0`, the marks will be
29244    /// positioned at the beginning of the time unit band step. If set to `0.5`, the marks will
29245    /// be positioned in the middle of the time unit band step.
29246    #[serde(skip_serializing_if = "Option::is_none")]
29247    #[builder(default)]
29248    pub time_unit_band_position: Option<f64>,
29249    /// Default relative band size for a time unit. If set to `1`, the bandwidth of the marks
29250    /// will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be
29251    /// half of the time unit band step.
29252    #[serde(skip_serializing_if = "Option::is_none")]
29253    #[builder(default)]
29254    pub time_unit_band_size: Option<f64>,
29255    /// The tooltip text string to show upon mouse hover or an object defining which fields
29256    /// should the tooltip be derived from.
29257    ///
29258    /// - If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding`
29259    /// will be used.
29260    /// - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted
29261    /// data point will be used.
29262    /// - If set to `null` or `false`, then no tooltip will be used.
29263    ///
29264    /// See the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for
29265    /// a detailed discussion about tooltip  in Vega-Lite.
29266    ///
29267    /// __Default value:__ `null`
29268    #[serde(skip_serializing_if = "Option::is_none")]
29269    #[builder(default)]
29270    pub tooltip: Option<OverlayMarkDefTooltip>,
29271    #[serde(skip_serializing_if = "Option::is_none")]
29272    #[builder(default)]
29273    pub url: Option<Box<Color>>,
29274    #[serde(skip_serializing_if = "Option::is_none")]
29275    #[builder(default)]
29276    pub width: Option<CornerRadiusUnion>,
29277    /// X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified
29278    /// `x2` or `width`.
29279    ///
29280    /// The `value` of this channel can be a number or a string `"width"` for the width of the
29281    /// plot.
29282    #[serde(skip_serializing_if = "Option::is_none")]
29283    #[builder(default)]
29284    pub x: Option<XUnion>,
29285    /// X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
29286    ///
29287    /// The `value` of this channel can be a number or a string `"width"` for the width of the
29288    /// plot.
29289    #[serde(skip_serializing_if = "Option::is_none")]
29290    #[builder(default)]
29291    pub x2: Option<XUnion>,
29292    /// Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified
29293    /// `y2` or `height`.
29294    ///
29295    /// The `value` of this channel can be a number or a string `"height"` for the height of the
29296    /// plot.
29297    #[serde(skip_serializing_if = "Option::is_none")]
29298    #[builder(default)]
29299    pub y: Option<YUnion>,
29300    /// Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.
29301    ///
29302    /// The `value` of this channel can be a number or a string `"height"` for the height of the
29303    /// plot.
29304    #[serde(skip_serializing_if = "Option::is_none")]
29305    #[builder(default)]
29306    pub y2: Option<YUnion>,
29307}
29308
29309/// Title configuration, which determines default properties for all
29310/// [titles](https://vega.github.io/vega-lite/docs/title.html). For a full list of title
29311/// configuration options, please see the [corresponding section of the title
29312/// documentation](https://vega.github.io/vega-lite/docs/title.html#config).
29313#[derive(Debug, Clone, Serialize, Deserialize)]
29314#[serde(rename_all = "camelCase")]
29315#[derive(Default, Builder)]
29316#[builder(setter(into, strip_option))]
29317pub struct BaseTitleNoValueRefs {
29318    /// Horizontal text alignment for title text. One of `"left"`, `"center"`, or `"right"`.
29319    #[serde(skip_serializing_if = "Option::is_none")]
29320    #[builder(default)]
29321    pub align: Option<Align>,
29322    #[serde(skip_serializing_if = "Option::is_none")]
29323    #[builder(default)]
29324    pub anchor: Option<TitleAnchorUnion>,
29325    #[serde(skip_serializing_if = "Option::is_none")]
29326    #[builder(default)]
29327    pub angle: Option<CornerRadiusUnion>,
29328    #[serde(skip_serializing_if = "Option::is_none")]
29329    #[builder(default)]
29330    pub aria: Option<Aria>,
29331    /// Vertical text baseline for title and subtitle text. One of `"alphabetic"` (default),
29332    /// `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and
29333    /// `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated
29334    /// relative to the *lineHeight* rather than *fontSize* alone.
29335    #[serde(skip_serializing_if = "Option::is_none")]
29336    #[builder(default)]
29337    pub baseline: Option<Baseline>,
29338    #[serde(skip_serializing_if = "Option::is_none")]
29339    #[builder(default)]
29340    pub color: Option<Box<Color>>,
29341    #[serde(skip_serializing_if = "Option::is_none")]
29342    #[builder(default)]
29343    pub dx: Option<CornerRadiusUnion>,
29344    #[serde(skip_serializing_if = "Option::is_none")]
29345    #[builder(default)]
29346    pub dy: Option<CornerRadiusUnion>,
29347    #[serde(skip_serializing_if = "Option::is_none")]
29348    #[builder(default)]
29349    pub font: Option<Box<Color>>,
29350    #[serde(skip_serializing_if = "Option::is_none")]
29351    #[builder(default)]
29352    pub font_size: Option<FontSize>,
29353    #[serde(skip_serializing_if = "Option::is_none")]
29354    #[builder(default)]
29355    pub font_style: Option<Box<Color>>,
29356    #[serde(skip_serializing_if = "Option::is_none")]
29357    #[builder(default)]
29358    pub font_weight: Option<FontWeightUnion>,
29359    #[serde(skip_serializing_if = "Option::is_none")]
29360    #[builder(default)]
29361    pub frame: Option<Box<Color>>,
29362    #[serde(skip_serializing_if = "Option::is_none")]
29363    #[builder(default)]
29364    pub limit: Option<FontSize>,
29365    #[serde(skip_serializing_if = "Option::is_none")]
29366    #[builder(default)]
29367    pub line_height: Option<CornerRadiusUnion>,
29368    #[serde(skip_serializing_if = "Option::is_none")]
29369    #[builder(default)]
29370    pub offset: Option<CornerRadiusUnion>,
29371    #[serde(skip_serializing_if = "Option::is_none")]
29372    #[builder(default)]
29373    pub orient: Option<TitleParamsOrient>,
29374    #[serde(skip_serializing_if = "Option::is_none")]
29375    #[builder(default)]
29376    pub subtitle_color: Option<Box<Color>>,
29377    #[serde(skip_serializing_if = "Option::is_none")]
29378    #[builder(default)]
29379    pub subtitle_font: Option<Box<Color>>,
29380    #[serde(skip_serializing_if = "Option::is_none")]
29381    #[builder(default)]
29382    pub subtitle_font_size: Option<FontSize>,
29383    #[serde(skip_serializing_if = "Option::is_none")]
29384    #[builder(default)]
29385    pub subtitle_font_style: Option<Box<Color>>,
29386    #[serde(skip_serializing_if = "Option::is_none")]
29387    #[builder(default)]
29388    pub subtitle_font_weight: Option<FontWeightUnion>,
29389    #[serde(skip_serializing_if = "Option::is_none")]
29390    #[builder(default)]
29391    pub subtitle_line_height: Option<CornerRadiusUnion>,
29392    #[serde(skip_serializing_if = "Option::is_none")]
29393    #[builder(default)]
29394    pub subtitle_padding: Option<CornerRadiusUnion>,
29395    #[serde(skip_serializing_if = "Option::is_none")]
29396    #[builder(default)]
29397    pub zindex: Option<FontSize>,
29398}
29399
29400/// Define [custom format
29401/// configuration](https://vega.github.io/vega-lite/docs/config.html#format) for tooltips. If
29402/// unspecified, default format config will be applied.
29403#[derive(Debug, Clone, Serialize, Deserialize)]
29404#[serde(rename_all = "camelCase")]
29405#[derive(Default, Builder)]
29406#[builder(setter(into, strip_option))]
29407pub struct FormatConfig {
29408    /// If normalizedNumberFormatType is not specified, D3 number format for axis labels, text
29409    /// marks, and tooltips of normalized stacked fields (fields with `stack: "normalize"`). For
29410    /// example `"s"` for SI units. Use [D3's number format
29411    /// pattern](https://github.com/d3/d3-format#locale_format).
29412    ///
29413    /// If `config.normalizedNumberFormatType` is specified and `config.customFormatTypes` is
29414    /// `true`, this value will be passed as `format` alongside `datum.value` to the
29415    /// `config.numberFormatType` function. __Default value:__ `%`
29416    #[serde(skip_serializing_if = "Option::is_none")]
29417    #[builder(default)]
29418    pub normalized_number_format: Option<String>,
29419    /// [Custom format
29420    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for
29421    /// `config.normalizedNumberFormat`.
29422    ///
29423    /// __Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed
29424    /// as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format).
29425    /// __Note:__ You must also set `customFormatTypes` to `true` to use this feature.
29426    #[serde(skip_serializing_if = "Option::is_none")]
29427    #[builder(default)]
29428    pub normalized_number_format_type: Option<String>,
29429    /// If numberFormatType is not specified, D3 number format for guide labels, text marks, and
29430    /// tooltips of non-normalized fields (fields *without* `stack: "normalize"`). For example
29431    /// `"s"` for SI units. Use [D3's number format
29432    /// pattern](https://github.com/d3/d3-format#locale_format).
29433    ///
29434    /// If `config.numberFormatType` is specified and `config.customFormatTypes` is `true`, this
29435    /// value will be passed as `format` alongside `datum.value` to the `config.numberFormatType`
29436    /// function.
29437    #[serde(skip_serializing_if = "Option::is_none")]
29438    #[builder(default)]
29439    pub number_format: Option<String>,
29440    /// [Custom format
29441    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for
29442    /// `config.numberFormat`.
29443    ///
29444    /// __Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed
29445    /// as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format).
29446    /// __Note:__ You must also set `customFormatTypes` to `true` to use this feature.
29447    #[serde(skip_serializing_if = "Option::is_none")]
29448    #[builder(default)]
29449    pub number_format_type: Option<String>,
29450    /// Default time format for raw time values (without time units) in text marks, legend labels
29451    /// and header labels.
29452    ///
29453    /// __Default value:__ `"%b %d, %Y"` __Note:__ Axes automatically determine the format for
29454    /// each label automatically so this config does not affect axes.
29455    #[serde(skip_serializing_if = "Option::is_none")]
29456    #[builder(default)]
29457    pub time_format: Option<String>,
29458    /// [Custom format
29459    /// type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for
29460    /// `config.timeFormat`.
29461    ///
29462    /// __Default value:__ `undefined` -- This is equilvalent to call D3-time-format, which is
29463    /// exposed as [`timeFormat` in
29464    /// Vega-Expression](https://vega.github.io/vega/docs/expressions/#timeFormat). __Note:__ You
29465    /// must also set `customFormatTypes` to `true` and there must *not* be a `timeUnit` defined
29466    /// to use this feature.
29467    #[serde(skip_serializing_if = "Option::is_none")]
29468    #[builder(default)]
29469    pub time_format_type: Option<String>,
29470}
29471
29472/// Default properties for [single view
29473/// plots](https://vega.github.io/vega-lite/docs/spec.html#single).
29474#[derive(Debug, Clone, Serialize, Deserialize)]
29475#[serde(rename_all = "camelCase")]
29476#[derive(Default, Builder)]
29477#[builder(setter(into, strip_option))]
29478pub struct ViewConfig {
29479    /// Whether the view should be clipped.
29480    #[serde(skip_serializing_if = "Option::is_none")]
29481    #[builder(default)]
29482    pub clip: Option<bool>,
29483    /// The default height when the plot has a continuous y-field for x or latitude, or has arc
29484    /// marks.
29485    ///
29486    /// __Default value:__ `200`
29487    #[serde(skip_serializing_if = "Option::is_none")]
29488    #[builder(default)]
29489    pub continuous_height: Option<f64>,
29490    /// The default width when the plot has a continuous field for x or longitude, or has arc
29491    /// marks.
29492    ///
29493    /// __Default value:__ `200`
29494    #[serde(skip_serializing_if = "Option::is_none")]
29495    #[builder(default)]
29496    pub continuous_width: Option<f64>,
29497    #[serde(skip_serializing_if = "Option::is_none")]
29498    #[builder(default)]
29499    pub corner_radius: Option<CornerRadiusUnion>,
29500    /// The mouse cursor used over the view. Any valid [CSS cursor
29501    /// type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.
29502    #[serde(skip_serializing_if = "Option::is_none")]
29503    #[builder(default)]
29504    pub cursor: Option<Cursor>,
29505    /// The default height when the plot has non arc marks and either a discrete y-field or no
29506    /// y-field. The height can be either a number indicating a fixed height or an object in the
29507    /// form of `{step: number}` defining the height per discrete step.
29508    ///
29509    /// __Default value:__ a step size based on `config.view.step`.
29510    #[serde(skip_serializing_if = "Option::is_none")]
29511    #[builder(default)]
29512    pub discrete_height: Option<DiscreteHeightUnion>,
29513    /// The default width when the plot has non-arc marks and either a discrete x-field or no
29514    /// x-field. The width can be either a number indicating a fixed width or an object in the
29515    /// form of `{step: number}` defining the width per discrete step.
29516    ///
29517    /// __Default value:__ a step size based on `config.view.step`.
29518    #[serde(skip_serializing_if = "Option::is_none")]
29519    #[builder(default)]
29520    pub discrete_width: Option<DiscreteWidthUnion>,
29521    /// The fill color.
29522    ///
29523    /// __Default value:__ `undefined`
29524    #[serde(skip_serializing_if = "Option::is_none")]
29525    #[builder(default)]
29526    pub fill: Option<Box<Color>>,
29527    #[serde(skip_serializing_if = "Option::is_none")]
29528    #[builder(default)]
29529    pub fill_opacity: Option<Opacity>,
29530    /// The overall opacity (value between [0,1]).
29531    ///
29532    /// __Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or
29533    /// `square` marks or layered `bar` charts and `1` otherwise.
29534    #[serde(skip_serializing_if = "Option::is_none")]
29535    #[builder(default)]
29536    pub opacity: Option<CornerRadiusUnion>,
29537    /// Default step size for x-/y- discrete fields.
29538    #[serde(skip_serializing_if = "Option::is_none")]
29539    #[builder(default)]
29540    pub step: Option<f64>,
29541    /// The stroke color.
29542    ///
29543    /// __Default value:__ `"#ddd"`
29544    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
29545    #[builder(default)]
29546    pub stroke: RemovableValue<Color>,
29547    #[serde(skip_serializing_if = "Option::is_none")]
29548    #[builder(default)]
29549    pub stroke_cap: Option<Cap>,
29550    #[serde(skip_serializing_if = "Option::is_none")]
29551    #[builder(default)]
29552    pub stroke_dash: Option<StrokeDashUnion>,
29553    #[serde(skip_serializing_if = "Option::is_none")]
29554    #[builder(default)]
29555    pub stroke_dash_offset: Option<CornerRadiusUnion>,
29556    #[serde(skip_serializing_if = "Option::is_none")]
29557    #[builder(default)]
29558    pub stroke_join: Option<StrokeJoinUnion>,
29559    #[serde(skip_serializing_if = "Option::is_none")]
29560    #[builder(default)]
29561    pub stroke_miter_limit: Option<CornerRadiusUnion>,
29562    #[serde(skip_serializing_if = "Option::is_none")]
29563    #[builder(default)]
29564    pub stroke_opacity: Option<Opacity>,
29565    #[serde(skip_serializing_if = "Option::is_none")]
29566    #[builder(default)]
29567    pub stroke_width: Option<FontSize>,
29568}
29569
29570/// The default height when the plot has non arc marks and either a discrete y-field or no
29571/// y-field. The height can be either a number indicating a fixed height or an object in the
29572/// form of `{step: number}` defining the height per discrete step.
29573///
29574/// __Default value:__ a step size based on `config.view.step`.
29575#[derive(Debug, Clone, Serialize, Deserialize)]
29576#[serde(untagged)]
29577#[derive(From)]
29578pub enum DiscreteHeightUnion {
29579    DiscreteHeightClass(DiscreteHeightClass),
29580    Double(f64),
29581}
29582
29583#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
29584#[builder(setter(into, strip_option))]
29585pub struct DiscreteHeightClass {
29586    #[serde(skip_serializing_if = "Option::is_none")]
29587    #[builder(default)]
29588    pub step: Option<f64>,
29589}
29590
29591/// The default width when the plot has non-arc marks and either a discrete x-field or no
29592/// x-field. The width can be either a number indicating a fixed width or an object in the
29593/// form of `{step: number}` defining the width per discrete step.
29594///
29595/// __Default value:__ a step size based on `config.view.step`.
29596#[derive(Debug, Clone, Serialize, Deserialize)]
29597#[serde(untagged)]
29598#[derive(From)]
29599pub enum DiscreteWidthUnion {
29600    DiscreteWidthClass(DiscreteWidthClass),
29601    Double(f64),
29602}
29603
29604#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
29605#[builder(setter(into, strip_option))]
29606pub struct DiscreteWidthClass {
29607    #[serde(skip_serializing_if = "Option::is_none")]
29608    #[builder(default)]
29609    pub step: Option<f64>,
29610}
29611
29612/// The full data set, included inline. This can be an array of objects or primitive values,
29613/// an object, or a string. Arrays of primitive values are ingested as objects with a `data`
29614/// property. Strings are parsed according to the specified format type.
29615#[derive(Debug, Clone, Serialize, Deserialize)]
29616#[serde(untagged)]
29617#[derive(From)]
29618pub enum InlineDatasetValue {
29619    AnythingMap(HashMap<String, Option<serde_json::Value>>),
29620    String(String),
29621    UnionArray(Vec<serde_json::value::Value>),
29622}
29623
29624/// A specification of the view that gets faceted.
29625///
29626/// A specification of the view that gets repeated.
29627///
29628/// A full layered plot specification, which may contains `encoding` and `projection`
29629/// properties that will be applied to underlying unit (single-view) specifications.
29630///
29631/// Any specification in Vega-Lite.
29632///
29633/// Unit spec that can have a composite mark and row or column channels (shorthand for a
29634/// facet spec).
29635///
29636/// Base interface for a repeat specification.
29637///
29638/// Base interface for a facet specification.
29639///
29640/// Base interface for a generalized concatenation specification.
29641///
29642/// Base interface for a vertical concatenation specification.
29643///
29644/// Base interface for a horizontal concatenation specification.
29645#[derive(Debug, Clone, Serialize, Deserialize, Default, Builder)]
29646#[builder(setter(into, strip_option))]
29647pub struct VegaliteSpec {
29648    /// An object describing the data source. Set to `null` to ignore the parent's data source.
29649    /// If no data is set, it is derived from the parent.
29650    #[serde(default, skip_serializing_if = "RemovableValue::is_default")]
29651    #[builder(default)]
29652    pub data: RemovableValue<UrlData>,
29653    /// Description of this mark for commenting purpose.
29654    #[serde(skip_serializing_if = "Option::is_none")]
29655    #[builder(default)]
29656    pub description: Option<String>,
29657    /// A shared key-value mapping between encoding channels and definition of fields in the
29658    /// underlying layers.
29659    ///
29660    /// A key-value mapping between encoding channels and definition of fields.
29661    #[serde(skip_serializing_if = "Option::is_none")]
29662    #[builder(default)]
29663    pub encoding: Option<SpecEncoding>,
29664    /// The height of a visualization.
29665    ///
29666    /// - For a plot with a continuous y-field, height should be a number.
29667    /// - For a plot with either a discrete y-field or no y-field, height can be either a number
29668    /// indicating a fixed height or an object in the form of `{step: number}` defining the
29669    /// height per discrete step. (No y-field is equivalent to having one discrete step.)
29670    /// - To enable responsive sizing on height, it should be set to `"container"`.
29671    ///
29672    /// __Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous
29673    /// y-field and `config.view.discreteHeight` otherwise.
29674    ///
29675    /// __Note:__ For plots with [`row` and `column`
29676    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
29677    /// height of a single view and the `"container"` option cannot be used.
29678    ///
29679    /// __See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.
29680    #[serde(skip_serializing_if = "Option::is_none")]
29681    #[builder(default)]
29682    pub height: Option<SpecHeight>,
29683    /// Layer or single view specifications to be layered.
29684    ///
29685    /// __Note__: Specifications inside `layer` cannot use `row` and `column` channels as
29686    /// layering facet specifications is not allowed. Instead, use the [facet
29687    /// operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a
29688    /// facet.
29689    #[serde(skip_serializing_if = "Option::is_none")]
29690    #[builder(default)]
29691    pub layer: Option<Vec<LayerSpec>>,
29692    /// Name of the visualization for later reference.
29693    #[serde(skip_serializing_if = "Option::is_none")]
29694    #[builder(default)]
29695    pub name: Option<String>,
29696    /// An object defining properties of the geographic projection shared by underlying layers.
29697    ///
29698    /// An object defining properties of geographic projection, which will be applied to `shape`
29699    /// path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other marks.
29700    #[serde(skip_serializing_if = "Option::is_none")]
29701    #[builder(default)]
29702    pub projection: Option<Box<Projection>>,
29703    /// Scale, axis, and legend resolutions for view composition specifications.
29704    #[serde(skip_serializing_if = "Option::is_none")]
29705    #[builder(default)]
29706    pub resolve: Option<Box<Resolve>>,
29707    /// Title for the plot.
29708    #[serde(skip_serializing_if = "Option::is_none")]
29709    #[builder(default)]
29710    pub title: Option<TitleUnion>,
29711    /// An array of data transformations such as filter and new field calculation.
29712    #[serde(skip_serializing_if = "Option::is_none")]
29713    #[builder(default)]
29714    pub transform: Option<Vec<Transform>>,
29715    /// An object defining the view background's fill and stroke.
29716    ///
29717    /// __Default value:__ none (transparent)
29718    #[serde(skip_serializing_if = "Option::is_none")]
29719    #[builder(default)]
29720    pub view: Option<Box<ViewBackground>>,
29721    /// The width of a visualization.
29722    ///
29723    /// - For a plot with a continuous x-field, width should be a number.
29724    /// - For a plot with either a discrete x-field or no x-field, width can be either a number
29725    /// indicating a fixed width or an object in the form of `{step: number}` defining the width
29726    /// per discrete step. (No x-field is equivalent to having one discrete step.)
29727    /// - To enable responsive sizing on width, it should be set to `"container"`.
29728    ///
29729    /// __Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous
29730    /// x-field and `config.view.discreteWidth` otherwise.
29731    ///
29732    /// __Note:__ For plots with [`row` and `column`
29733    /// channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the
29734    /// width of a single view and the `"container"` option cannot be used.
29735    ///
29736    /// __See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.
29737    #[serde(skip_serializing_if = "Option::is_none")]
29738    #[builder(default)]
29739    pub width: Option<SpecHeight>,
29740    /// A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
29741    /// `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark
29742    /// definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).
29743    #[serde(skip_serializing_if = "Option::is_none")]
29744    #[builder(default)]
29745    pub mark: Option<AnyMark>,
29746    /// An array of parameters that may either be simple variables, or more complex selections
29747    /// that map user input to data queries.
29748    #[serde(skip_serializing_if = "Option::is_none")]
29749    #[builder(default)]
29750    pub params: Option<Vec<SelectionParameter>>,
29751    /// The alignment to apply to grid rows and columns. The supported string values are `"all"`,
29752    /// `"each"`, and `"none"`.
29753    ///
29754    /// - For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed
29755    /// one after the other.
29756    /// - For `"each"`, subviews will be aligned into a clean grid structure, but each row or
29757    /// column may be of variable size.
29758    /// - For `"all"`, subviews will be aligned and each row or column will be sized identically
29759    /// based on the maximum observed size. String values for this property will be applied to
29760    /// both grid rows and columns.
29761    ///
29762    /// Alternatively, an object value of the form `{"row": string, "column": string}` can be
29763    /// used to supply different alignments for rows and columns.
29764    ///
29765    /// __Default value:__ `"all"`.
29766    #[serde(skip_serializing_if = "Option::is_none")]
29767    #[builder(default)]
29768    pub align: Option<Box<VegaliteAlign>>,
29769    /// The bounds calculation method to use for determining the extent of a sub-plot. One of
29770    /// `full` (the default) or `flush`.
29771    ///
29772    /// - If set to `full`, the entire calculated bounds (including axes, title, and legend) will
29773    /// be used.
29774    /// - If set to `flush`, only the specified width and height values for the sub-view will be
29775    /// used. The `flush` setting can be useful when attempting to place sub-plots without axes
29776    /// or legends into a uniform grid structure.
29777    ///
29778    /// __Default value:__ `"full"`
29779    #[serde(skip_serializing_if = "Option::is_none")]
29780    #[builder(default)]
29781    pub bounds: Option<Box<Bounds>>,
29782    /// Boolean flag indicating if subviews should be centered relative to their respective rows
29783    /// or columns.
29784    ///
29785    /// An object value of the form `{"row": boolean, "column": boolean}` can be used to supply
29786    /// different centering values for rows and columns.
29787    ///
29788    /// __Default value:__ `false`
29789    ///
29790    /// Boolean flag indicating if subviews should be centered relative to their respective rows
29791    /// or columns.
29792    ///
29793    /// __Default value:__ `false`
29794    #[serde(skip_serializing_if = "Option::is_none")]
29795    #[builder(default)]
29796    pub center: Option<Box<Center>>,
29797    /// The spacing in pixels between sub-views of the composition operator. An object of the
29798    /// form `{"row": number, "column": number}` can be used to set different spacing values for
29799    /// rows and columns.
29800    ///
29801    /// __Default value__: Depends on `"spacing"` property of [the view composition
29802    /// configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by
29803    /// default)
29804    ///
29805    /// The spacing in pixels between sub-views of the concat operator.
29806    ///
29807    /// __Default value__: `10`
29808    #[serde(skip_serializing_if = "Option::is_none")]
29809    #[builder(default)]
29810    pub spacing: Option<Box<Spacing>>,
29811    /// The number of columns to include in the view composition layout.
29812    ///
29813    /// __Default value__: `undefined` -- An infinite number of columns (a single row) will be
29814    /// assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel
29815    /// (for `facet` and `repeat`).
29816    ///
29817    /// __Note__:
29818    ///
29819    /// 1) This property is only for:
29820    /// - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)
29821    /// - the `facet` and `repeat` operator with one field/repetition definition (without
29822    /// row/column nesting)
29823    ///
29824    /// 2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using
29825    /// the `row` channel (for `facet` and `repeat`).
29826    #[serde(skip_serializing_if = "Option::is_none")]
29827    #[builder(default)]
29828    pub columns: Option<f64>,
29829    /// Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If
29830    /// `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The
29831    /// repeated views are laid out in a wrapped row. You can set the number of columns to
29832    /// control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed
29833    /// fields to be repeated along the particular orientations. The objects `{"repeat": "row"}`
29834    /// and `{"repeat": "column"}` can be used to refer to the repeated field respectively.
29835    #[serde(skip_serializing_if = "Option::is_none")]
29836    #[builder(default)]
29837    pub repeat: Option<Box<RepeatUnion>>,
29838    /// A specification of the view that gets repeated.
29839    ///
29840    /// A specification of the view that gets faceted.
29841    #[serde(skip_serializing_if = "Option::is_none")]
29842    #[builder(default)]
29843    pub spec: Option<Box<SpecSpec>>,
29844    /// Definition for how to facet the data. One of: 1) [a field definition for faceting the
29845    /// plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An
29846    /// object that maps `row` and `column` channels to their field
29847    /// definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)
29848    #[serde(skip_serializing_if = "Option::is_none")]
29849    #[builder(default)]
29850    pub facet: Option<Box<Facet>>,
29851    /// A list of views to be concatenated.
29852    #[serde(skip_serializing_if = "Option::is_none")]
29853    #[builder(default)]
29854    pub concat: Option<Vec<Spec>>,
29855    /// A list of views to be concatenated and put into a column.
29856    #[serde(skip_serializing_if = "Option::is_none")]
29857    #[builder(default)]
29858    pub vconcat: Option<Vec<Spec>>,
29859    /// A list of views to be concatenated and put into a row.
29860    #[serde(skip_serializing_if = "Option::is_none")]
29861    #[builder(default)]
29862    pub hconcat: Option<Vec<Spec>>,
29863}