Structs
Area-Specific Config
Axis configuration, which determines default properties for all
x
and y
axes. For a full list of axis
configuration options, please see the corresponding section of the axis
documentation.Bar-Specific Config
Binning properties or boolean flag for determining whether to bin data or not.
An interval selection also adds a rectangle mark to depict the
extents of the interval. The
mark
property can be used to customize the
appearance of the mark.Vega-Lite configuration object. This property can only be defined at the top-level of a
specification.
An object describing the data source
An object that specifies the format for parsing the data.
Object for defining datetime in Vega-Lite Filter.
If both month and quarter are provided, month has higher precedence.
day
cannot be combined with other date.
We accept string for month and day names.Definition object for a constant value of an encoding channel.
A URL to load upon mouse click.
A key-value mapping between encoding channels and definition of fields.
A sort definition for sorting a discrete scale in an encoding field definition.
Horizontal facets for trellis plots.
An object that describes mappings between
row
and column
channels and their field
definitions.Definition object for a data field, its type and transformation of an encoding channel.
An object defining properties of a facet’s header.
Header configuration, which determines default properties for all
header. For a full list of header
configuration options, please see the corresponding section of in the header
documentation.
The default definition for an
interval
selection. All
properties and transformations
for an interval selection definition (except type
) may be specified here.Layer Spec with encoding and projection
Properties of a legend or boolean flag for determining whether to show it.
Legend configuration, which determines default properties for all
legends. For a full list of legend
configuration options, please see the corresponding section of in the legend
documentation.
Line-Specific Config
Secondary data reference.
Circle-Specific Config
Color of the marks – either fill or stroke color based on the
filled
property of mark
definition.
By default, color
represents fill color for "area"
, "bar"
, "tick"
,
"text"
, "trail"
, "circle"
, and "square"
/ stroke color for "line"
and
"point"
.The default definition for a
multi
selection. All
properties and transformations
for a multi selection definition (except type
) may be specified here.An object defining properties of geographic projection, which will be applied to
shape
path for "geoshape"
marks
and to latitude
and "longitude"
channels for other marks.Projection configuration, which determines default properties for all
projections. For a full list of
projection configuration options, please see the corresponding section of the projection
documentation.
An object that describes what fields should be repeated into views that are laid out as a
row
or column
.Reference to a repeated value.
Scale, axis, and legend resolutions for facets.
Scale configuration determines default properties for all
scales. For a full list of scale
configuration options, please see the corresponding section of the scale
documentation.
An object hash for defining default properties for each type of selections.
The default definition for a
single
selection. All
properties and transformations
for a single selection definition (except type
) may be specified here.A sort definition for transform
Unit spec that can have a composite mark.
Layer Spec with encoding and projection
A shared key-value mapping between encoding channels and definition of fields in the
underlying layers.
Text of the
text
mark.Text-Specific Config
A FieldDef with Condition
{
condition: {value: …},
field: …,
…
}
Tick-Specific Config
Specific axis config for axes with “band” scales.
Title configuration, which determines default properties for all
titles. For a full list of title
configuration options, please see the corresponding section of the title
documentation.
Default properties for single view
plots.
X2 coordinates for ranged
"area"
, "bar"
, "rect"
, and "rule"
.X coordinates of the marks, or width of horizontal
"bar"
and "area"
.Enums
Aggregation function for the field
(e.g.,
mean
, sum
, median
, min
, max
, count
).The alignment to apply to grid rows and columns.
The supported string values are
"all"
, "each"
, and "none"
.The anchor position for placing the title. One of
"start"
, "middle"
, or "end"
. For
example, with an orientation of top these anchor positions map to a left-, center-, or
right-aligned title.A string describing the mark type (one of
"bar"
, "circle"
, "square"
, "tick"
,
"line"
,
"area"
, "point"
, "rule"
, "geoshape"
, and "text"
) or a mark definition
object.Sets how the visualization size should be determined. If a string, should be one of
"pad"
, "fit"
or "none"
.
Object values can additionally specify parameters for content sizing and automatic
resizing.
"fit"
is only supported for single and layered views that don’t use rangeStep
.The sizing format type. One of
"pad"
, "fit"
or "none"
. See the autosize
type documentation for
descriptions of each.Establishes a two-way binding between the interval selection and the scales
used within the same view. This allows a user to interactively pan and
zoom the view.
The bounds calculation method to use for determining the extent of a sub-plot. One of
full
(the default) or flush
.A constant value in visual domain (e.g.,
"red"
/ “#0099ff” for color, values between
0
to 1
for opacity).Determines how size calculation should be performed, one of
"content"
or "padding"
.
The default setting ("content"
) interprets the width and height settings as the data
rectangle (plotting) dimensions, to which padding is then added. In contrast, the
"padding"
setting includes the padding within the view size calculations, such that the
width and height settings indicate the total intended size of the view.The mouse cursor used over the mark. Any valid CSS cursor
type can be used.
Type of input data:
"json"
, "csv"
, "tsv"
, "dsv"
.
The default format type is determined by the extension of the file URL.
If no extension is detected, "json"
will be used by default.The full data set, included inline. This can be an array of objects or primitive values,
an object, or a string.
Arrays of primitive values are ingested as objects with a
data
property. Strings are
parsed according to the specified format type.Value representing the day of a week. This can be one of: (1) integer value –
Warning: A DateTime definition object with
1
represents Monday; (2) case-insensitive day name (e.g., "Monday"
); (3)
case-insensitive, 3-character short day name (e.g., "Mon"
). Warning: A DateTime definition object with
day
** should not be combined with year
, quarter
,
month
, or date
.The direction of the text. One of
"ltr"
(left-to-right) or "rtl"
(right-to-left).
This property determines on which side is truncated in response to the limit parameter.Customized domain values.
The value that the field should be equal to.
Defines how Vega-Lite generates title for fields. There are three possible styles:
The font style (e.g.,
"italic"
).The font weight.
This can be either a string (e.g
"bold"
, "normal"
) or a number (100
, 200
, 300
,
…, 900
where "normal"
= 400
and "bold"
= 700
).The horizontal alignment of the text. One of
"left"
, "right"
, "center"
.The full data set, included inline. This can be an array of objects or primitive values,
an object, or a string.
Arrays of primitive values are ingested as objects with a
data
property. Strings are
parsed according to the specified format type.The line interpolation method to use for line and area marks. One of the following:
The interpolation method for range values. By default, a general interpolator for
numbers, dates, strings and colors (in RGB space) is used. For color ranges, this
property allows interpolation in alternative color spaces. Legal values include
rgb
,
hsl
, hsl-long
, lab
, hcl
, hcl-long
, cubehelix
and cubehelix-long
(‘-long’
variants use longer paths in polar coordinate spaces). If object-valued, this property
accepts an object with a string-valued type property and an optional numeric gamma
property applicable to rgb and cubehelix interpolators. For more, see the d3-interpolate
documentation.Indicates if labels should be hidden if they exceed the axis range. If
false
(the
default) no bounds overlap analysis is performed. If true
, labels will be hidden if
they exceed the axis range by more than 1 pixel. If this property is a number, it
specifies the pixel tolerance: the maximum amount by which a label bounding box may
exceed the axis range.The orientation of the legend, which determines how the legend is positioned within the
scene. One of “left”, “right”, “top-left”, “top-right”, “bottom-left”, “bottom-right”,
“none”.
The type of the legend. Use
"symbol"
to create a discrete legend and "gradient"
for a
continuous color gradient.The
filter
property must be one of the predicate definitions:All types of primitive marks.
One of: (1) integer value representing the month from
1
-12
. 1
represents January;
(2) case-insensitive month name (e.g., "January"
); (3) case-insensitive, 3-character
short month name (e.g., "Jan"
).Extending the domain so that it starts and ends on nice round values. This method
typically modifies the scale’s domain, and may only extend the bounds to the nearest
round value. Nicing is useful if the domain is computed from data and may be irregular.
For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2,
1.0].
The window or aggregation operations to apply within a window, including
rank
, lead
,
sum
, average
or count
. See the list of all supported operations
here.The orientation of a non-stacked bar, tick, area, and line charts.
The value is either horizontal (default) or vertical.
The default visualization padding, in pixels, from the edge of the visualization canvas
to the data rectangle. If a number, specifies padding for all sides.
If an object, the value should have the format
{"left": 5, "top": 5, "right": 5, "bottom": 5}
to specify padding for each side of the visualization.The
filter
property must be one of the predicate definitions:Filter using a selection name.
A constant value in visual domain (e.g.,
"red"
/ “#0099ff” for color, values between
0
to 1
for opacity).The range of the scale. One of:
The type of scale. Vega-Lite supports the following categories of scale types:
A string indicating a color
scheme name (e.g.,
"category10"
or "viridis"
) or a scheme parameter
object.Filter using a selection name.
With layered and multi-view displays, a strategy that determines how
selections’ data queries are resolved when applied in a filter transform,
conditional encoding rule, or scale domain.
Sort order for the encoded field.
The value that the field should be equal to.
Default stack offset for stackable mark.
The stroke cap for line ending style. One of
"butt"
, "round"
, or "square"
.The stroke line join method. One of
"miter"
, "round"
or "bevel"
.A string or array of strings indicating the name of custom styles to apply to the mark. A
style is a named collection of mark property defaults defined within the style
configuration. If style is
an array, later styles will override earlier styles. Any mark
properties explicitly
defined within the
encoding
will override a style default.Vertical text baseline for the header title. One of
"top"
, "bottom"
, "middle"
.Time unit for the field to be filtered.
Default title orientation (“top”, “bottom”, “left”, or “right”)
When truthy, allows a user to interactively move an interval selection
back-and-forth. Can be
true
, false
(to disable panning), or a
Vega event stream definition
which must include a start and end event to trigger continuous panning.The encoded field’s type of measurement (
"quantitative"
, "temporal"
, "ordinal"
, or
"nominal"
).
It can also be a "geojson"
type for encoding
‘geoshape’.The vertical alignment of the text. One of
"top"
, "middle"
, "bottom"
.Whether to sort the field in ascending or descending order.
By default, all data values are considered to lie within an empty selection.
When set to
none
, empty selections contain no data values.The cartographic projection to use. This value is case-insensitive, for example
"albers"
and "Albers"
indicate the same projection type. You can find all valid
projection types in the
documentation.