Channel Options#
Some encoding channels allow for additional options to be expressed. These can control things like axis properties, scale properties, headers and titles, binning parameters, aggregation, sorting, and many more.
The section titles below refer to the channels introduced in Channels and show the accepted options for these channels.
X and Y#
The X
and Y
encodings accept the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
axis |
anyOf( |
An object defining properties of axis’s gridlines, ticks and labels. If Default value: If undefined, default See also: |
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
impute |
anyOf( |
An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as See also: |
scale |
anyOf( |
An object defining properties of the channel’s scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If Default value: If undefined, default See also: |
sort |
Sort order for the encoded field. For continuous fields (quantitative or temporal), For discrete fields,
Default value: Note: See also: |
|
stack |
anyOf( |
Type of stacking offset if the field should be stacked.
Default value: See also: |
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Color, Fill, and Stroke#
The Color
, Fill
, and Stroke
encodings accept the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
condition |
anyOf( |
One or more value definition(s) with Note: A field definition’s |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
legend |
anyOf( |
An object defining properties of the legend. If Default value: If undefined, default See also: |
scale |
anyOf( |
An object defining properties of the channel’s scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If Default value: If undefined, default See also: |
sort |
Sort order for the encoded field. For continuous fields (quantitative or temporal), For discrete fields,
Default value: Note: See also: |
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Shape#
The Shape
encoding accepts the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
condition |
anyOf( |
One or more value definition(s) with Note: A field definition’s |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
legend |
anyOf( |
An object defining properties of the legend. If Default value: If undefined, default See also: |
scale |
anyOf( |
An object defining properties of the channel’s scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If Default value: If undefined, default See also: |
sort |
Sort order for the encoded field. For continuous fields (quantitative or temporal), For discrete fields,
Default value: Note: See also: |
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Order#
The Order
encoding accepts the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
sort |
The sort order. One of |
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Angle, FillOpacity, Opacity, Size, StrokeOpacity, and StrokeWidth#
The Angle
, FillOpacity
, Opacity
, Size
, StrokeOpacity
,
and StrokeWidth
encodings accept the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
condition |
anyOf( |
One or more value definition(s) with Note: A field definition’s |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
legend |
anyOf( |
An object defining properties of the legend. If Default value: If undefined, default See also: |
scale |
anyOf( |
An object defining properties of the channel’s scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If Default value: If undefined, default See also: |
sort |
Sort order for the encoded field. For continuous fields (quantitative or temporal), For discrete fields,
Default value: Note: See also: |
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
StrokeDash#
The StrokeDash
encoding accepts the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
condition |
anyOf( |
One or more value definition(s) with Note: A field definition’s |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
legend |
anyOf( |
An object defining properties of the legend. If Default value: If undefined, default See also: |
scale |
anyOf( |
An object defining properties of the channel’s scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If Default value: If undefined, default See also: |
sort |
Sort order for the encoded field. For continuous fields (quantitative or temporal), For discrete fields,
Default value: Note: See also: |
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Row and Column#
The Row
and Column
, and Facet
encodings accept the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
align |
The alignment to apply to row/column facet’s subplot. The supported string values are
Default value: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
center |
|
Boolean flag indicating if facet’s subviews should be centered relative to their respective rows or columns. Default value: |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
header |
anyOf( |
An object defining properties of a facet’s header. |
sort |
anyOf( |
Sort order for the encoded field. For continuous fields (quantitative or temporal), For discrete fields,
Default value: Note: |
spacing |
|
The spacing in pixels between facet’s sub-views. Default value: Depends on |
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Facet#
The Facet
encoding accepts the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
align |
anyOf( |
The alignment to apply to grid rows and columns. The supported string values are
Alternatively, an object value of the form Default value: |
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
bounds |
[‘full’, ‘flush’] |
The bounds calculation method to use for determining the extent of a sub-plot. One of
Default value: |
center |
anyOf( |
Boolean flag indicating if subviews should be centered relative to their respective rows or columns. An object value of the form Default value: |
columns |
|
The number of columns to include in the view composition layout. Default value: Note:
|
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
header |
anyOf( |
An object defining properties of a facet’s header. |
sort |
anyOf( |
Sort order for the encoded field. For continuous fields (quantitative or temporal), For discrete fields,
Default value: Note: |
spacing |
anyOf( |
The spacing in pixels between sub-views of the composition operator. An object of the form Default value: Depends on |
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Text#
The Text
encoding accepts the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
condition |
anyOf( |
One or more value definition(s) with Note: A field definition’s |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
format |
anyOf( |
When used with the default
See the When used with a Default value: Derived from |
formatType |
|
The format type for labels. One of Default value:
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Href, Tooltip, Url#
The Href
, Tooltip
, and Url
encodings accept the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
condition |
anyOf( |
One or more value definition(s) with Note: A field definition’s |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
format |
anyOf( |
When used with the default
See the When used with a Default value: Derived from |
formatType |
|
The format type for labels. One of Default value:
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Detail#
The Detail
encoding accepts the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Latitude and Longitude#
The Latitude
and Longitude
encodings accept the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
|
A flag for binning a
Default value: See also: |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
|
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Radius and Theta#
The Radius
and Theta
encodings accept the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
anyOf( |
A flag for binning a
Default value: See also: |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
scale |
anyOf( |
An object defining properties of the channel’s scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If Default value: If undefined, default See also: |
sort |
Sort order for the encoded field. For continuous fields (quantitative or temporal), For discrete fields,
Default value: Note: See also: |
|
stack |
anyOf( |
Type of stacking offset if the field should be stacked.
Default value: See also: |
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|
type |
The type of measurement ( Vega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified Default value:
Note:
See also: |
Latitude2, Longitude2, Radius2, Theta2, X2, Y2, XError, YError, XError2, and YError2#
The Latitude2
, Longitude2
, Radius2
, Theta2
, X2
, Y2
, XError
, YError
, XError2
, and YError2
encodings accept the following options:
Click to show table
Property |
Type |
Description |
---|---|---|
aggregate |
Aggregation function for the field (e.g., Default value: See also: |
|
bandPosition |
|
Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to |
bin |
|
A flag for binning a
Default value: See also: |
field |
Required. A string defining the name of the field from which to pull a data value or an object defining iterated values from the See also: Notes: 1) Dots ( |
|
timeUnit |
anyOf( |
Time unit (e.g., Default value: See also: |
title |
anyOf( |
A title for the field. If Default value: derived from the field’s name and transformation function ( Notes:
|