Crate vega_lite_4
source ·Expand description
This crate provides a thin wrapper over Vega-Lite v4, as well as a few helpers to help ingest data from various sources and builders to help build graphs. See examples for more help on how to use it.
Documentation Disclaimer
Most of this crate has been generated from the json schema of Vega-Lite, so is the documentation on Vega-Lite
types. A lot of struct are documented as accepting a string but are actually not. See
FontWeight
for an example. Those are usually converted to an enum, or may have a
String
variant wrapping the actual string (for example, Month
). In those cases,
From<String>
is implemented for the enum, and will automatically wrap the string in the correct variant.
Structs
- Builder for
AggregatedFieldDef
. - Builder for
AmbitiousExprRef
. - Rotation angle of point and text marks.
- Builder for
AngleClass
. - Area-Specific Config
- Builder for
AreaConfig
. - Builder for
ArgmDef
. - Builder for
AutoSizeParams
. - Builder for
Axis
. - Axis configuration, which determines default properties for all
x
andy
axes. For a full list of axis configuration options, please see the corresponding section of the axis documentation. - Builder for
AxisConfig
. - Builder for
AxisResolveMap
. - Builder for
BackgroundExprRef
. - Bar-Specific Config
- Builder for
BarConfig
. - 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.
- Builder for
BaseTitleNoValueRefs
. - Builder for
BinExtentClass
. - Binning properties or boolean flag for determining whether to bin data or not.
- Builder for
BinParams
. - Binds the parameter to an external input element such as a slider, selection list or radio button group.
- Builder for
Binding
. - Box Config
- Builder for
BoxPlotConfig
. - 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. - Builder for
BrushConfig
. - Builder for
ClearDerivedStream
. - 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"
. - Builder for
ColorClass
. - Default configuration for all concatenation and repeat view composition operators (
concat
,hconcat
,vconcat
, andrepeat
) - Builder for
CompositionConfig
. - Builder for
ConditionClass
. - Builder for
ConditionCondition
. - Builder for
ConditionConditionClass
. - Builder for
Conditional
. - Builder for
ConditionalPredicateValueDefAlignNullExprRef
. - Builder for
ConditionalPredicateValueDefColorNullExprRef
. - Builder for
ConditionalPredicateValueDefFontStyleNullExprRef
. - Builder for
ConditionalPredicateValueDefFontWeightNullExprRef
. - Builder for
ConditionalPredicateValueDefNumberClass
. - Builder for
ConditionalPredicateValueDefNumberExprRefClass
. - Builder for
ConditionalPredicateValueDefNumberNullExprRef
. - Builder for
ConditionalPredicateValueDefNumberNullExprRefElement
. - Builder for
ConditionalPredicateValueDefStringNullExprRef
. - Builder for
ConditionalPredicateValueDefStringNullExprRefClass
. - Builder for
ConditionalPredicateValueDefTextBaselineNullExprRef
. - Builder for
ConditionalSelectionValueDefNumberExprRefClass
. - Builder for
ConditionalValueDefGradientStringNullExprRef
. - Builder for
ConditionalValueDefNumber
. - Builder for
ConditionalValueDefNumberExprRef
. - Builder for
ConditionalValueDefNumberExprRefElement
. - Builder for
ConditionalValueDefStringNullExprRef
. - Builder for
ConditionalValueDefTextExprRef
. - Vega-Lite configuration object. This property can only be defined at the top-level of a specification.
- Builder for
Config
. - Builder for
CunningExprRef
. - Secondary data source to lookup in.
- Builder for
Data
. - An object that specifies the format for parsing the data.
- Builder for
DataFormat
. - 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. - Builder for
DateTime
. - Builder for
Def
. - A text description of this mark for ARIA accessibility (SVG output only). For SVG output the
"aria-label"
attribute will be set to this description. - Builder for
DescriptionClass
. - Builder for
DiscreteHeightClass
. - Builder for
DiscreteWidthClass
. - 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. - Builder for
DomainDateTime
. - 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. - Builder for
DomainMaxDateTime
. - Builder for
DomainUnionWith
. - A key-value mapping between encoding channels and definition of fields.
- Builder for
EdEncoding
. - A sort definition for sorting a discrete scale in an encoding field definition.
- Builder for
EncodingSortField
. - A sort definition for sorting a discrete scale in an encoding field definition.
- Builder for
EncodingSortFieldFieldName
. - 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. - Builder for
EqualDateTime
. - ErrorBand Config
- Builder for
ErrorBandConfig
. - ErrorBar Config
- Builder for
ErrorBarConfig
. - Builder for
ExprRef
. - Definition for how to facet the data. One of: 1) a field definition for faceting the plot by one field 2) An object that maps
row
andcolumn
channels to their field definitions - Builder for
Facet
. - A field definition for the (flexible) facet of trellis plots.
- Builder for
FacetEncodingFieldDef
. - A field definition for the horizontal facet of trellis plots.
- Builder for
FacetFieldDef
. - A field definition for the horizontal facet of trellis plots.
- Builder for
FacetFieldDefFieldName
. - Definition for how to facet the data. One of: 1) a field definition for faceting the plot by one field 2) An object that maps
row
andcolumn
channels to their field definitions - Builder for
FacetFieldName
. - A FieldDef with Condition
{ condition: {value: …}, field: …, … } - Builder for
FieldOrDatumDefWithConditionStringFieldDefString
. - 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"
. - Builder for
FillClass
. - Rotation angle of point and text marks.
- Builder for
FillOpacityClass
. - Binds the parameter to an external input element such as a slider, selection list or radio button group.
- Builder for
FluffyBinding
. - Builder for
FluffyConditionalExprRef
. - Builder for
FluffyConditionalPredicateValueDefNumberNullExprRef
. - Builder for
FluffyConditionalValueDefStringExprRef
. - Builder for
FluffyExprRef
. - Builder for
FluffyLinearGradient
. - Builder for
FluffyTooltipContent
. - Builder for
GradientStop
. - Builder for
GraticuleParams
. - Builder for
GridColorExprRef
. - Builder for
GridDashOffsetExprRef
. - Builder for
GridOpacityExprRef
. - Builder for
GridWidthExprRef
. - 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. - Builder for
GtDateTime
. - An object defining properties of a facet’s header.
- Builder for
Header
. - Header configuration, which determines default properties for all headers.
- Builder for
HeaderConfig
. - Builder for
HilariousExprRef
. - A text description of this mark for ARIA accessibility (SVG output only). For SVG output the
"aria-label"
attribute will be set to this description. - Builder for
HrefClass
. - Builder for
ImputeParams
. - Builder for
ImputeSequence
. - Builder for
IndecentExprRef
. - Builder for
IndigoExprRef
. - The default definition for an
interval
selection. All properties and transformations for an interval selection definition (excepttype
) may be specified here. - Builder for
IntervalSelectionConfig
. - Builder for
JoinAggregateFieldDef
. - Field Def without scale (and without bin: “binned” support).
- Builder for
KeyClass
. - Latitude-2 position for geographically projected ranged
"area"
,"bar"
,"rect"
, and"rule"
. - Builder for
Latitude2Class
. - Latitude position of geographically projected marks.
- Builder for
LatitudeClass
. - A specification of the view that gets repeated.
- Builder for
LayerElement
. - A shared key-value mapping between encoding channels and definition of fields in the underlying layers.
- Builder for
LayerEncoding
. - Properties of a legend or boolean flag for determining whether to show it.
- Builder for
Legend
. - 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.
- Builder for
LegendConfig
. - Builder for
LegendResolveMap
. - Builder for
LegendStreamBinding
. - Line-Specific Config
- Builder for
LineConfig
. - Latitude-2 position for geographically projected ranged
"area"
,"bar"
,"rect"
, and"rule"
. - Builder for
Longitude2Class
. - Latitude position of geographically projected marks.
- Builder for
LongitudeClass
. - Data source or selection for secondary data reference.
- Builder for
Lookup
. - Builder for
MagentaExprRef
. - Circle-Specific Config
- Builder for
MarkConfig
. - Builder for
MarkConfigExprOrSignalRef
. - Stroke dash of the marks.
- Builder for
MarkPropDefNumber
. - Shape of the mark.
- Builder for
MarkPropDefStringNullTypeForShape
. - The default definition for a
multi
selection. All properties and transformations for a multi selection definition (excepttype
) may be specified here. - Builder for
MultiSelectionConfig
. - Builder for
NiceTimeIntervalStep
. - Any specification in Vega-Lite.
- Builder for
NormalizedSpec
. - A specification of the view that gets repeated.
- Builder for
NormalizedSpecSpec
. - Builder for
OnDerivedStream
. - Rotation angle of point and text marks.
- Builder for
OpacityClass
. - Builder for
OrderDef
. - Builder for
OrderFieldDef
. - Builder for
OverlayMarkDef
. - Builder for
Parameter
. - Builder for
Predicate
. - 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.
- Builder for
Projection
. - Binds the parameter to an external input element such as a slider, selection list or radio button group.
- Builder for
PurpleBinding
. - Builder for
PurpleConditionalExprRef
. - Builder for
PurpleConditionalPredicateValueDefNumberNullExprRef
. - Builder for
PurpleConditionalPredicateValueDefStringNullExprRef
. - Builder for
PurpleConditionalValueDefStringExprRef
. - Builder for
PurpleExprRef
. - Builder for
PurpleLinearGradient
. - Builder for
PurpleTooltipContent
. - Latitude-2 position for geographically projected ranged
"area"
,"bar"
,"rect"
, and"rule"
. - Builder for
Radius2Class
. - The outer radius in pixels of arc marks.
- Builder for
RadiusClass
. - Builder for
RangeClass
. - 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. - Builder for
RangeDateTime
. - Builder for
RangeRange
. - Arc-specific Config
- Builder for
RectConfig
. - Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If
"repeat"
is an array, the field can be referred to as{"repeat": "repeat"}
. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps"row"
and/or"column"
to the listed fields to be repeated along the particular orientations. The objects{"repeat": "row"}
and{"repeat": "column"}
can be used to refer to the repeated field respectively. - Builder for
RepeatMapping
. - Reference to a repeated value.
- Builder for
RepeatRef
. - 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. - Builder for
RepeatRefClass
. - Scale, axis, and legend resolutions for view composition specifications.
- Builder for
Resolve
. - Builder for
RowColBoolean
. - Builder for
RowColLayoutAlign
. - Builder for
RowColNumber
. - A field definition for the horizontal facet of trellis plots.
- Builder for
RowColumnEncodingFieldDef
. - Builder for
ScaleBinParams
. - Builder for
Scale
. - 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.
- Builder for
ScaleConfig
. - Builder for
ScaleResolveMap
. - Builder for
SchemeParams
. - Builder for
Selection
. - An object hash for defining default properties for each type of selections.
- Builder for
SelectionConfig
. - Builder for
SelectionDef
. - Generate a sequence of numbers.
- Builder for
SequenceParams
. - The default definition for a
single
selection. All properties and transformations for a single selection definition (excepttype
) may be specified here. - Builder for
SingleSelectionConfig
. - Rotation angle of point and text marks.
- Builder for
SizeClass
. - A sort definition for sorting a discrete scale in an encoding field definition.
- Builder for
SortEncodingSortField
. - A sort definition for transform
- Builder for
SortField
. - A specification of the view that gets repeated.
- Builder for
Spec
. - A key-value mapping between encoding channels and definition of fields.
- Builder for
SpecEncoding
. - Builder for
SphereClass
. - Builder for
Step
. - Builder for
StickyExprRef
. - Builder for
StickyLinearGradient
. - Builder for
Stream
. - Builder for
StringFieldDef
. - 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"
. - Builder for
StrokeClass
. - Rotation angle of point and text marks.
- Builder for
StrokeOpacityClass
. - Rotation angle of point and text marks.
- Builder for
StrokeWidthClass
. - Arc-specific Config
- Builder for
StyleValue
. - Builder for
TentacledExprRef
. - Builder for
TentacledLinearGradient
. - Text of the
text
mark. - Builder for
TextDef
. - Latitude-2 position for geographically projected ranged
"area"
,"bar"
,"rect"
, and"rule"
. - Builder for
Theta2Class
. - The outer radius in pixels of arc marks.
- Builder for
ThetaClass
. - Tick-Specific Config
- Builder for
TickConfig
. - Builder for
TickCountTimeIntervalStep
. - Builder for
TimeUnitParams
. - Builder for
TitleParams
. - Builder for
Transform
. - Field Def without scale (and without bin: “binned” support).
- Builder for
TypedFieldDef
. - A text description of this mark for ARIA accessibility (SVG output only). For SVG output the
"aria-label"
attribute will be set to this description. - Builder for
UrlClass
. - Builder for
UrlData
. - Builder for
ValueLinearGradient
. - A Vega-Lite top-level specification. This is the root class for all Vega-Lite specifications. (The json schema is generated from this type.)
- Builder for
Vegalite
. - A specification of the view that gets faceted.
- Builder for
VegaliteSpec
. - An object defining the view background’s fill and stroke.
- Builder for
ViewBackground
. - Default properties for single view plots.
- Builder for
ViewConfig
. - Builder for
WindowFieldDef
. - Latitude-2 position for geographically projected ranged
"area"
,"bar"
,"rect"
, and"rule"
. - Builder for
X2Class
. - X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
. - Builder for
XClass
. - Error value of x coordinates for error specified
"errorbar"
and"errorband"
. - Builder for
XError2Class
. - Error value of x coordinates for error specified
"errorbar"
and"errorband"
. - Builder for
XErrorClass
. - Latitude-2 position for geographically projected ranged
"area"
,"bar"
,"rect"
, and"rule"
. - Builder for
Y2Class
. - X coordinates of the marks, or width of horizontal
"bar"
and"area"
without specifiedx2
orwidth
. - Builder for
YClass
. - Error value of x coordinates for error specified
"errorbar"
and"errorband"
. - Builder for
YError2Class
. - Error value of x coordinates for error specified
"errorbar"
and"errorband"
. - Builder for
YErrorClass
.
Enums
- Aggregation function for the field (e.g.,
"mean"
,"sum"
,"median"
,"min"
,"max"
,"count"
). - The aggregation operation to apply to the fields (e.g.,
"sum"
,"average"
, or"count"
). See the full list of supported aggregation operations for more information. - Error type for AggregatedFieldDefBuilder
- Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation.
- Error type for AmbitiousExprRefBuilder
- An object indicating bin properties, or simply
true
for using default bin parameters. - Error type for AngleClassBuilder
- A string describing the mark type (one of
"bar"
,"circle"
,"square"
,"tick"
,"line"
,"area"
,"point"
,"rule"
,"geoshape"
, and"text"
) or a mark definition object. - Error type for AreaConfigBuilder
- Error type for ArgmDefBuilder
- Error type for AutoSizeParamsBuilder
- 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. - The sizing format type. One of
"pad"
,"fit"
,"fit-x"
,"fit-y"
, or"none"
. See the autosize type documentation for descriptions of each. - Error type for AxisBuilder
- Error type for AxisConfigBuilder
- The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored. - Error type for AxisResolveMapBuilder
- Error type for BackgroundExprRefBuilder
- Error type for BarConfigBuilder
- Error type for BaseTitleNoValueRefsBuilder
- Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of
"alphabetic"
(default),"top"
,"middle"
,"bottom"
,"line-top"
, or"line-bottom"
. The"line-top"
and"line-bottom"
values operate similarly to"top"
and"bottom"
, but are calculated relative to the lineHeight rather than fontSize alone. - A two-element (
[min, max]
) array indicating the range of desired bin values. - Error type for BinExtentClassBuilder
- Error type for BinParamsBuilder
- 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.
- Error type for BindingBuilder
- The bounds calculation method to use for determining the extent of a sub-plot. One of
full
(the default) orflush
. - Error type for BoxPlotConfigBuilder
- The extent of the whiskers. Available options include: -
"min-max"
: min and max are the lower and upper whiskers respectively. - A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range [Q1 - k * IQR, Q3 + k * IQR] where Q1 and Q3 are the first and third quartiles while IQR is the interquartile range (Q3-Q1). - Error type for BrushConfigBuilder
- Error type for ClearDerivedStreamBuilder
- CSS color property to use as the background of the entire view.
- Error type for ColorClassBuilder
- Error type for CompositionConfigBuilder
- Error type for ConditionClassBuilder
- Error type for ConditionConditionBuilder
- Error type for ConditionConditionClassBuilder
- Error type for ConditionalBuilder
- Error type for ConditionalPredicateValueDefAlignNullExprRefBuilder
- Error type for ConditionalPredicateValueDefColorNullExprRefBuilder
- Error type for ConditionalPredicateValueDefFontStyleNullExprRefBuilder
- Error type for ConditionalPredicateValueDefFontWeightNullExprRefBuilder
- Error type for ConditionalPredicateValueDefGradientStringNullExprRefClassBuilder
- Error type for ConditionalPredicateValueDefNumberClassBuilder
- Error type for ConditionalPredicateValueDefNumberExprRefClassBuilder
- Error type for ConditionalPredicateValueDefNumberNullExprRefBuilder
- Error type for ConditionalPredicateValueDefNumberNullExprRefElementBuilder
- Error type for ConditionalPredicateValueDefStringNullExprRefBuilder
- Error type for ConditionalPredicateValueDefStringNullExprRefClassBuilder
- Error type for ConditionalPredicateValueDefTextBaselineNullExprRefBuilder
- A constant value in visual domain (e.g.,
"red"
/"#0099ff"
/ gradient definition for color, values between0
to1
for opacity). - Error type for ConditionalSelectionValueDefNumberExprRefClassBuilder
- Error type for ConditionalValueDefGradientStringNullExprRefBuilder
- Error type for ConditionalValueDefNumberBuilder
- Error type for ConditionalValueDefNumberExprRefBuilder
- Error type for ConditionalValueDefNumberExprRefElementBuilder
- Predicate for triggering the condition
- Filter using a selection name or a logical composition of selection names.
- A constant value in visual domain (e.g.,
"red"
/"#0099ff"
/ gradient definition for color, values between0
to1
for opacity). - Error type for ConditionalValueDefStringNullExprRefBuilder
- Error type for ConditionalValueDefTextExprRefBuilder
- A constant value in visual domain (e.g.,
"red"
/"#0099ff"
/ gradient definition for color, values between0
to1
for opacity). - Error type for ConfigBuilder
- 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. - Error type for CunningExprRefBuilder
- The mouse cursor used over the mark. Any valid CSS cursor type can be used.
- Error type for DataBuilder
- Error type for DataFormatBuilder
- Type of input data:
"json"
,"csv"
,"tsv"
,"dsv"
. - Error type for DateTimeBuilder
- Value representing the day of a week. This can be one of: (1) integer value –
1
represents Monday; (2) case-insensitive day name (e.g.,"Monday"
); (3) case-insensitive, 3-character short day name (e.g.,"Mon"
). - Error type for DefBuilder
- Error type for DescriptionClassBuilder
- Error type for DiscreteHeightClassBuilder
- The default height when the plot has non arc marks and either a discrete y-field or no y-field. The height can be either a number indicating a fixed height or an object in the form of
{step: number}
defining the height per discrete step. - Error type for DiscreteWidthClassBuilder
- The default width when the plot has non-arc marks and either a discrete x-field or no x-field. The width can be either a number indicating a fixed width or an object in the form of
{step: number}
defining the width per discrete step. - Error type for DomainDateTimeBuilder
- Error type for DomainMaxDateTimeBuilder
- Customized domain values in the form of constant values or dynamic values driven by a selection.
- Error type for DomainUnionWithBuilder
- Error type for EdEncodingBuilder
- By default,
all
data values are considered to lie within an empty selection. When set tonone
, empty selections contain no data values. - Error type for EncodingSortFieldBuilder
- Error type for EncodingSortFieldFieldNameBuilder
- The value that the field should be equal to.
- Error type for EqualDateTimeBuilder
- Error type for ErrorBandConfigBuilder
- Error type for ErrorBarConfigBuilder
- The extent of the band. Available options include: -
"ci"
: Extend the band to the confidence interval of the mean. -"stderr"
: The size of band are set to the value of standard error, extending from the mean. -"stdev"
: The size of band are set to the value of standard deviation, extending from the mean. -"iqr"
: Extend the band to the q1 and q3. - Error type for ExprRefBuilder
- The extent of the band. Available options include: -
"ci"
: Extend the band to the confidence interval of the mean. -"stderr"
: The size of band are set to the value of standard error, extending from the mean. -"stdev"
: The size of band are set to the value of standard deviation, extending from the mean. -"iqr"
: Extend the band to the q1 and q3. - Error type for FacetBuilder
- Error type for FacetEncodingFieldDefBuilder
- Error type for FacetFieldDefBuilder
- Error type for FacetFieldDefFieldNameBuilder
- Error type for FacetFieldNameBuilder
- Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the
repeat
operator. - Error type for FieldOrDatumDefWithConditionStringFieldDefStringBuilder
- Defines how Vega-Lite generates title for fields. There are three possible styles: -
"verbal"
(Default) - displays function in a verbal style (e.g., “Sum of field”, “Year-month of date”, “field (binned)”). -"function"
- displays function using parentheses and capitalized texts (e.g., “SUM(field)”, “YEARMONTH(date)”, “BIN(field)”). - Error type for FillClassBuilder
- Error type for FillOpacityClassBuilder
- Error type for FluffyBindingBuilder
- Error type for FluffyConditionalExprRefBuilder
- Error type for FluffyConditionalPredicateValueDefNumberNullExprRefBuilder
- Error type for FluffyConditionalValueDefStringExprRefBuilder
- Error type for FluffyExprRefBuilder
- Error type for FluffyLinearGradientBuilder
- Sort order for the encoded field.
- Error type for FluffyTooltipContentBuilder
- The type of gradient. Use
"linear"
for a linear gradient. - Error type for GradientStopBuilder
- Generate graticule GeoJSON data for geographic reference lines.
- Error type for GraticuleParamsBuilder
- Error type for GridColorExprRefBuilder
- Error type for GridDashOffsetExprRefBuilder
- Error type for GridOpacityExprRefBuilder
- Error type for GridWidthExprRefBuilder
- Error type for GtDateTimeBuilder
- Error type for HeaderBuilder
- Error type for HeaderConfigBuilder
- Error type for HilariousExprRefBuilder
- Error type for HrefClassBuilder
- Error type for ImputeParamsBuilder
- The imputation method to use for the field value of imputed data objects. One of
"value"
,"mean"
,"median"
,"max"
or"min"
. - Error type for ImputeSequenceBuilder
- Error type for IndecentExprRefBuilder
- Error type for IndigoExprRefBuilder
- 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: -
"linear"
: piecewise linear segments, as in a polyline. -"linear-closed"
: close the linear segments to form a polygon. -"step"
: alternate between horizontal and vertical segments, as in a step function. -"step-before"
: alternate between vertical and horizontal segments, as in a step function. -"step-after"
: alternate between horizontal and vertical segments, as in a step function. -"basis"
: a B-spline, with control point duplication on the ends. -"basis-open"
: an open B-spline; may not intersect the start or end. -"basis-closed"
: a closed B-spline, as in a loop. -"cardinal"
: a Cardinal spline, with control point duplication on the ends. -"cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. -"cardinal-closed"
: a closed Cardinal spline, as in a loop. -"bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline. -"monotone"
: cubic interpolation that preserves monotonicity in y. - Error type for IntervalSelectionConfigBuilder
- Error type for JoinAggregateFieldDefBuilder
- Error type for KeyClassBuilder
- Indicates if labels should be hidden if they exceed the axis range. If
false
(the default) no bounds overlap analysis is performed. Iftrue
, 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 strategy to use for resolving overlap of axis labels. If
false
(the default), no overlap reduction is attempted. If set totrue
or"parity"
, a strategy of removing every other label is used (this works well for standard linear axes). If set to"greedy"
, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes). - Error type for Latitude2ClassBuilder
- Error type for LatitudeClassBuilder
- Error type for LayerElementBuilder
- Error type for LayerEncodingBuilder
- The alignment to apply to symbol legends rows and columns. The supported string values are
"all"
,"each"
(the default), andnone
. For more information, see the grid layout documentation. - When set, a selection is populated by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection’s
on
property. - Error type for LegendBuilder
- Error type for LegendConfigBuilder
- The orientation of the legend, which determines how the legend is positioned within the scene. One of
"left"
,"right"
,"top"
,"bottom"
,"top-left"
,"top-right"
,"bottom-left"
,"bottom-right"
,"none"
. - Error type for LegendResolveMapBuilder
- Error type for LegendStreamBindingBuilder
- 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. - The type of the legend. Use
"symbol"
to create a discrete legend and"gradient"
for a continuous color gradient. - Error type for LineConfigBuilder
- An array of inclusive minimum and maximum values for a field value of a data item to be included in the filtered data.
- Error type for Longitude2ClassBuilder
- Error type for LongitudeClassBuilder
- Error type for LookupBuilder
- Error type for MagentaExprRefBuilder
- The mark type. This could a primitive mark type (one of
"bar"
,"circle"
,"square"
,"tick"
,"line"
,"area"
,"point"
,"geoshape"
,"rule"
, and"text"
) or a composite mark type ("boxplot"
,"errorband"
,"errorbar"
). - Error type for MarkConfigBuilder
- Error type for MarkConfigExprOrSignalRefBuilder
- Default color.
- Error type for MarkPropDefNumberBuilder
- Error type for MarkPropDefStringNullTypeForShapeBuilder
- 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"
). - Error type for MultiSelectionConfigBuilder
- 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].
- Error type for NiceTimeIntervalStepBuilder
- An aggregate operation to perform on the field prior to sorting (e.g.,
"count"
,"mean"
and"median"
). An aggregation is required when there are multiple values of the sort field for each encoded data field. The input data objects will be aggregated, grouped by the encoded data field. - Error type for NormalizedSpecBuilder
- Error type for NormalizedSpecSpecBuilder
- Error type for OnDerivedStreamBuilder
- The window or aggregation operation to apply within a window (e.g.,
"rank"
,"lead"
,"sum"
,"average"
or"count"
). See the list of all supported operations here. - Error type for OpacityClassBuilder
- Error type for OrderDefBuilder
- Error type for OrderFieldDefBuilder
- One or more value definition(s) with a selection or a test predicate.
- The orientation of the header label. One of
"top"
,"bottom"
,"left"
or"right"
. - The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored. - Error type for OverlayMarkDefBuilder
- 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. - Error type for ParameterBuilder
- Error type for PredicateBuilder
- Predicate for triggering the condition
- A constant value in data domain.
- Error type for ProjectionBuilder
- 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. - Error type for PurpleBindingBuilder
- Error type for PurpleConditionalExprRefBuilder
- Error type for PurpleConditionalPredicateValueDefFontStyleNullExprRefBuilder
- Error type for PurpleConditionalPredicateValueDefFontWeightNullExprRefBuilder
- Error type for PurpleConditionalPredicateValueDefNumberNullExprRefBuilder
- Error type for PurpleConditionalPredicateValueDefStringNullExprRefBuilder
- Error type for PurpleConditionalValueDefStringExprRefBuilder
- Error type for PurpleExprRefBuilder
- 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.
- Error type for PurpleLinearGradientBuilder
- Error type for PurpleTooltipContentBuilder
- Error type for Radius2ClassBuilder
- Error type for RadiusClassBuilder
- Error type for RangeClassBuilder
- Error type for RangeDateTimeBuilder
- Error type for RangeRangeBuilder
- 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. - Error type for RectConfigBuilder
- Wrapper for a field that can be either the default value, null or specified
- Error type for RepeatMappingBuilder
- Error type for RepeatRefBuilder
- Error type for RepeatRefClassBuilder
- Error type for ResolveBuilder
- Error type for RowColBooleanBuilder
- Error type for RowColLayoutAlignBuilder
- Error type for RowColNumberBuilder
- Error type for RowColumnEncodingFieldDefBuilder
- Error type for ScaleBinParamsBuilder
- Bin boundaries can be provided to scales as either an explicit array of bin boundaries or as a bin specification object. The legal values are: - An array literal of bin boundary values. For example,
[0, 5, 10, 15, 20]
. The array must include both starting and ending boundaries. The previous example uses five values to indicate a total of four bin intervals: [0-5), [5-10), [10-15), [15-20]. Array literals may include signal references as elements. - A bin specification object that indicates the bin step size, and optionally the start and stop boundaries. - An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels. - Error type for ScaleBuilder
- Error type for ScaleConfigBuilder
- The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL 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
andcubehelix-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. - The range of the scale. One of:
- Error type for ScaleResolveMapBuilder
- The type of scale. Vega-Lite supports the following categories of scale types:
- A string indicating a color scheme name (e.g.,
"category10"
or"blues"
) or a scheme parameter object. - Error type for SchemeParamsBuilder
- Error type for SelectionBuilder
- Filter using a selection name or a logical composition of selection names.
- Error type for SelectionConfigBuilder
- Error type for SelectionDefBuilder
- Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:
- 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.
- Error type for SequenceParamsBuilder
- When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection’s
on
property. - The encoding channel to extract selected values for, when a selection is projected over multiple fields or encodings.
- Error type for SingleSelectionConfigBuilder
- Error type for SizeClassBuilder
- The sort order. One of
"ascending"
(default) or"descending"
. - Error type for SortEncodingSortFieldBuilder
- Error type for SortFieldBuilder
- The sort order. One of
"ascending"
(default) or"descending"
. - Sort order for the encoded field.
- Error type for SpecBuilder
- Error type for SpecEncodingBuilder
- Error type for SphereClassBuilder
- Generate sphere GeoJSON data for the full globe.
- Mode for stacking marks. One of
"zero"
(default),"center"
, or"normalize"
. The"zero"
offset will stack starting at0
. The"center"
offset will center the stacks. The"normalize"
offset will compute percentage values for each stack point, with output values in the range[0,1]
. - The type of measurement (
"quantitative"
,"temporal"
,"ordinal"
, or"nominal"
) for the encoded field or constant value (datum
). It can also be a"geojson"
type for encoding ‘geoshape’. - Error type for StepBuilder
- Error type for StickyExprRefBuilder
- Error type for StickyLinearGradientBuilder
- Error type for StreamBuilder
- Error type for StringFieldDefBuilder
- The stroke cap for line ending style. One of
"butt"
,"round"
, or"square"
. - Error type for StrokeClassBuilder
- A constant value in visual domain (e.g.,
"red"
/"#0099ff"
/ gradient definition for color, values between0
to1
for opacity). - The stroke line join method. One of
"miter"
,"round"
or"bevel"
. - Error type for StrokeOpacityClassBuilder
- Error type for StrokeWidthClassBuilder
- Error type for StyleValueBuilder
- Error type for TentacledExprRefBuilder
- Error type for TentacledLinearGradientBuilder
- Error type for TextDefBuilder
- 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. - Error type for Theta2ClassBuilder
- Error type for ThetaClassBuilder
- For band scales, indicates if ticks and grid lines should be placed at the
"center"
of a band (default) or at the band"extent"
s to indicate intervals - Error type for TickConfigBuilder
- Error type for TickCountTimeIntervalStepBuilder
- Defines how date-time values should be binned.
- Error type for TimeUnitParamsBuilder
- Time unit for the field to be tested.
- Default title orientation (
"top"
,"bottom"
,"left"
, or"right"
) - Error type for TitleParamsBuilder
- Title for the plot.
- Error type for TransformBuilder
- The imputation method to use for the field value of imputed data objects. One of
"value"
,"mean"
,"median"
,"max"
or"min"
. - 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 type of measurement (
"quantitative"
,"temporal"
,"ordinal"
, or"nominal"
) for the encoded field or constant value (datum
). It can also be a"geojson"
type for encoding ‘geoshape’. - Error type for TypedFieldDefBuilder
- Error type for UrlClassBuilder
- Error type for UrlDataBuilder
- 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. - Error type for ValueLinearGradientBuilder
- Explicitly set the visible axis tick values.
- The alignment to apply to grid rows and columns. The supported string values are
"all"
,"each"
, and"none"
. - Error type for VegaliteBuilder
- Error type for VegaliteSpecBuilder
- Error type for ViewBackgroundBuilder
- Error type for ViewConfigBuilder
- Error type for WindowFieldDefBuilder
- Error type for X2ClassBuilder
- Error type for XClassBuilder
- Error type for XError2ClassBuilder
- Error type for XErrorClassBuilder
- Error type for Y2ClassBuilder
- Error type for YClassBuilder
- Error type for YError2ClassBuilder
- Error type for YErrorClassBuilder
Traits
Functions
- Helper method turning an iterator over a
Serialize
-able type into a data that can’t be used in a graph.