Skip to content

Types Used in the Grammar

These types are used in the grammar but are not documented elsewhere.

AggregateOp

Type: "count" | "valid" | "sum" | "min" | "max" | "mean" | "q1" | "median" | "q3" | "variance"

Align

Type: "left" | "center" | "right"

ArrowConfig

buildIndex
Type: boolean

Whether the x channel should build an index for efficient subset rendering. If omitted, GenomeSpy enables indexing automatically for positional x encodings.

clip
Type: boolean | "x" | "y" | "never"

Controls whether the mark is clipped to the UnitView's rectangle. The values "x" and "y" clip only in the corresponding screen-space direction. Inherited clipping from parent containers still applies unless "never" is used.

Default value: the direction of zoomable positional scales

color
Type: string | ExprRef

Color of the mark. Affects either fill or stroke, depending on the filled property.

cullByVisibleRange
Type: boolean | "x" | "y"

Hide point-like mark instances whose anchor falls outside the inherited visible range in the given screen-space direction.

cursor
Type: string | ExprRef

Mouse cursor shown while the pointer is over the mark. Mark cursor takes precedence over enclosing view cursors.

Default value: browser default

direction
Type: "forward" | "reverse" | ExprRef

Direction of the arrowhead. "forward" places the arrowhead at the secondary endpoint (x2, y2). "reverse" places it at the primary endpoint (x, y). For data-driven direction, use the direction encoding channel.

Default value: "forward"

fill
Type: string | ExprRef

The fill color.

fillOpacity
Type: number | ExprRef

The fill opacity. Value between 0 and 1.

filled
Type: boolean

Whether the color represents the fill color (true) or the stroke color (false).

headAngle
Type: number | ExprRef

Angle in degrees between the arrow axis and an outer edge of the arrowhead. Smaller values produce longer, narrower heads. Larger values produce shorter, blunter heads. Values are clamped to [1, 90].

Default value: 45

headNotchAngle
Type: number | ExprRef

Angle in degrees between the arrow axis and the arrowhead notch edge. 90 places the notch point at the tip, producing a triangular head when headAngle is less than 90. Applies to "triangle" heads. "open" heads use headAngle for the notch edge as well. Values are clamped to [1, 90].

Default value: 90

headPlacement
Type: "inside" | "outside" | ExprRef

Placement of the arrowhead relative to the encoded segment. "inside" keeps the whole arrowhead within the encoded segment. "outside" places the arrowhead beyond the encoded segment so that the head starts at the segment endpoint.

Default value: "inside"

headShape
Type: "triangle" | "open" | ExprRef

Shape of the arrowhead. "triangle" draws a filled head. "open" draws an open head whose thickness matches the resolved size, even when stem is false.

Default value: "triangle"

headSpacing
Type: number | null | ExprRef

Spacing between repeated arrowheads as a multiplier of resolved size. The effective spacing is at least the rendered arrowhead footprint, including stroke. If null, arrowheads are not repeated.

Default value: null

headWidth
Type: number | ExprRef

Width of the arrowhead as a multiplier of resolved size. Values above 1 make the arrowhead wider than the stem.

Default value: 3

minBufferSize
Type: number

Minimum size for WebGL buffers (number of data items). Allows for using bufferSubData() to update graphics.

This property is intended for internal use.

minSize
Type: number | ExprRef

Minimum resolved arrow stem thickness in pixels. Applies to numeric, band-relative, and encoded size values.

Default value: 1

minStemLength
Type: number | ExprRef

Minimum visible length of the arrow stem in pixels. When a non-repeated arrow is too short for the configured shape and minimum stem length, the affected notch or head angle is made blunter toward 90 degrees. For "inside" placement, this applies to "triangle" heads and is measured from the start of the stem to where the stem meets the head notch edge. For "outside" placement, this applies when startNotch is true and is measured from the start notch to the head start. Has no effect when stem is false.

Default value: 0

opacity
Type: number | ExprRef

Opacity of the mark. Affects fillOpacity or strokeOpacity, depending on the filled property.

size
Type: number | ArrowRelativeSize | ExprRef

Arrow stem thickness in pixels, or as a fraction of the perpendicular band or view span for axis-aligned arrows.

Numeric values are pixels. { "band": 0.8 } resolves to 80% of the perpendicular band width, or 80% of the perpendicular view span when no band scale is available. Use channel to explicitly select the reference channel. Band-relative size is not supported for diagonal arrows.

Default value: 8

startNotch
Type: boolean | ExprRef

Whether to draw a notch at the start of the arrow. The start notch uses the same slope as the arrowhead edge.

Default value: false

stem
Type: boolean | ExprRef

Whether to draw the arrow stem. When false, the resolved size still controls open-head thickness. minStemLength has no effect when the stem is hidden.

Default value: true

stroke
Type: string | ExprRef

The stroke color

strokeOpacity
Type: number | ExprRef

The stroke opacity. Value between 0 and 1.

strokeWidth
Type: number | ExprRef

The stroke width in pixels.

style
Type: string | string[]

Named style reference(s) resolved from config.style. If an array is provided, later styles override earlier ones.

tooltip
Type: HandledTooltip | null | boolean

Tooltip handler. If null, no tooltip is shown. If string, specifies the tooltip handler to use.

x
Type: number | ExprRef

Position on the x axis.

x2
Type: number | ExprRef

The secondary position on the x axis.

xOffset
Type: number

Offsets of the x and x2 coordinates in pixels. The offset is applied after the viewport scaling and translation.

Default value: 0

y
Type: number | ExprRef

Position on the y axis.

y2
Type: number | ExprRef

The secondary position on the y axis.

yOffset
Type: number

Offsets of the y and y2 coordinates in pixels. The offset is applied after the viewport scaling and translation.

Default value: 0

ArrowDirection

Type: "forward" | "reverse"

ArrowRelativeSize

band Required
Type: number

Fraction of the perpendicular band or view span.

channel
Type: string

Channel whose band or view span is used. If omitted or "auto", GenomeSpy infers the perpendicular channel from the axis-aligned arrow endpoints. Band-relative size is not supported for diagonal arrows.

ArrowSize

Type: number | ArrowRelativeSize | ExprRef

AxisOrient

Type: "top" | "bottom" | "left" | "right"

AxisPlacement

Type: "outside" | "inside"

Baseline

Type: "top" | "middle" | "bottom" | "alphabetic" | "baseline"

BedDataFormat

parse
Type: Parse | null

If set to null, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of "number", "boolean", "date", or null (do not parse the field)). For example, "parse": {"modified_on": "date"} parses the modified_on field in each input record a Date value.

For "date", we parse data based using Javascript's Date.parse(). For Specific date formats can be provided (e.g., {foo: "date:'%m%d%Y'"}), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., {foo: "utc:'%m%d%Y'"}). See more about UTC time

BedpeDataFormat

columns
Type: array

Optional ordered list of field names for headerless BEDPE input. If omitted, BEDPE fields are resolved from the default BEDPE column order or from a matching header row when present.

parse
Type: Parse | null

If set to null, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of "number", "boolean", "date", or null (do not parse the field)). For example, "parse": {"modified_on": "date"} parses the modified_on field in each input record a Date value.

For "date", we parse data based using Javascript's Date.parse(). For Specific date formats can be provided (e.g., {foo: "date:'%m%d%Y'"}), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., {foo: "utc:'%m%d%Y'"}). See more about UTC time

BindCheckbox

debounce
Type: number

If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.

description
Type: string

An optional description or help text that is shown below the input element.

name
Type: string

By default, the parameter name is used to label input elements. This name property can be used instead to specify a custom label for the bound parameter.

BindInput

autocomplete
Type: string

A hint for form autofill. See the HTML autocomplete attribute for additional information.

debounce
Type: number

If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.

description
Type: string

An optional description or help text that is shown below the input element.

input
Type: string

The type of input element to use. The valid values are "checkbox", "radio", "range", "select", "text", "number", and "color".

name
Type: string

By default, the parameter name is used to label input elements. This name property can be used instead to specify a custom label for the bound parameter.

placeholder
Type: string

Text that appears in the form control when it has no value set.

BindRadioSelect

debounce
Type: number

If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.

description
Type: string

An optional description or help text that is shown below the input element.

input Required
Type: string

TODO

labels
Type: array

An array of label strings to represent the options values. If unspecified, the options value will be coerced to a string and used as the label.

name
Type: string

By default, the parameter name is used to label input elements. This name property can be used instead to specify a custom label for the bound parameter.

options Required
Type: array

An array of options to select from.

BindRange

debounce
Type: number

If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.

description
Type: string

An optional description or help text that is shown below the input element.

max
Type: number

Sets the maximum slider value. Defaults to the larger of the signal value and 100.

min
Type: number

Sets the minimum slider value. Defaults to the smaller of the signal value and 0.

name
Type: string

By default, the parameter name is used to label input elements. This name property can be used instead to specify a custom label for the bound parameter.

step
Type: number

Sets the minimum slider increment. If undefined, the step size will be automatically determined based on the min and max values.

Binding

Type: BindCheckbox | BindRadioSelect | BindRange | BindInput

BrushConfig

clip
Type: boolean | "never"

Whether the brush rectangle should be clipped to the viewport.

Default value: true

cursor
Type: string | ExprRef

Mouse cursor shown while the pointer is over the interval mark.

Default value: { expr: "intervalDragActive ? 'grabbing' : 'move'" }

fill
Type: string

The fill color of the interval mark.

Default value: "#808080"

fillOpacity
Type: number

The fill opacity of the interval mark (a value between 0 and 1).

Default value: 0.05

measure
Type: string

Where to display the measurement text (e.g., number of base pairs) for the interval selection.

- "none" -- do not show the measurement. - "inside" -- show inside the brush rectangle. - "outside" -- show outside the brush rectangle.

Default value: "none"

shadowBlur
Type: number | ExprRef

The blur radius of the drop shadow in pixels. Higher values produce a more diffuse shadow.

Default value: 0

shadowColor
Type: string | ExprRef

The color of the drop shadow. Any valid CSS color string is allowed.

Default value: "black"

shadowOffsetX
Type: number | ExprRef

The horizontal offset of the drop shadow in pixels. Positive values move the shadow to the right.

Default value: 0

shadowOffsetY
Type: number | ExprRef

The vertical offset of the drop shadow in pixels. Positive values move the shadow downward.

Default value: 0

shadowOpacity
Type: number | ExprRef

The opacity of the drop shadow. Value between 0 (fully transparent) and 1 (fully opaque).

Default value: 0 (disabled)

stroke
Type: string

The stroke color of the interval mark.

Default value: "black"

strokeOpacity
Type: number

The stroke opacity of the interval mark (a value between 0 and 1).

Default value: 0.2

strokeWidth
Type: number

The stroke width of the interval mark.

Default value: 1

zindex
Type: number

Z-order of the interval mark relative to the view content.

Values greater than 0 render after the view marks. Values less than or equal to 0 render before the marks.

Default value: 1

BuiltInThemeName

Type: "genomespy" | "vegalite" | "quartz" | "dark" | "fivethirtyeight" | "urbaninstitute"

ChannelWithScale

Type: "x" | "y" | "x2" | "y2" | "color" | "fill" | "stroke" | "opacity" | "fillOpacity" | "strokeOpacity" | "strokeWidth" | "size" | "shape" | "direction" | "angle" | "dx" | "dy"

ChromPosDef

axis
Type: GenomeAxis | null

An object defining properties of axis's gridlines, ticks and labels. If null, the axis for the encoding channel will be removed.

Default value: If undefined, default axis properties are applied.

See also: axis documentation.

band
Type: number

Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

chrom Required
Type: FieldName

The field having the chromosome or contig.

description
Type: string

A description of the encoded position. Can be used for documentation and to explain the meaning of the channel mapping.

domainInert
Type: boolean

Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level domainInert when an entire subtree should be excluded.

Default value: false

offset
Type: number

An offset or offsets that allow for adjusting the numbering base. The offset is subtracted from the positions.

GenomeSpy uses internally zero-based indexing with half-open intervals. UCSC-based formats (BED, etc.) generally use this scheme. However, for example, VCF files use one-based indexing and must be adjusted by setting the offset to 1.

Default: 0

pos
Type: FieldName

The field having an intra-chromosomal position.

resolutionChannel
Type: "x" | "y" | "x2" | "y2" | "color" | "fill" | "stroke" | "opacity" | "fillOpacity" | "strokeOpacity" | "strokeWidth" | "size" | "shape" | "direction" | "angle" | "dx" | "dy"

An alternative channel for scale resolution.

This is mainly for internal use and allows using color channel to resolve fill and stroke channels under certain circumstances.

scale
Type: Scale | null

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 null, the scale will be disabled and the data value will be directly encoded.

Default value: If undefined, default scale properties are applied.

See also: scale documentation.

title
Type: string | null

A title for the field. If null, the title will be removed.

ChromosomalLocus

chrom Required
Type: string

The name of the chromosome. For example: "chr1", "CHR1", or "1".

pos
Type: number

The zero-based position inside the chromosome or contig.

ColorDef

Type: FieldOrDatumDefWithCondition,(string|null)> | FieldOrDatumDefWithCondition | MarkPropExprDef | ValueDefWithCondition<(string|null),Type>

ColorSchemeConfig

Type: string | SchemeParams

CompareParams

field Required
Type: string (field name)[] | string (field name)

The field(s) to sort by

order
Type: ("ascending" | "descending")[] | "ascending" | "descending"

The order(s) to use: "ascending" (default), "descending".

ComplexDomain

Type: ChromosomalLocus[]

ConcatSpec

axes
Type: object

Defines properties for axis resolutions used by this view subtree.

Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

baseUrl
Type: string

The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.

columns Required
Type: number

The number of columns in the grid.

concat Required
Type: array

TODO

config
Type: GenomeSpyConfig

Configures defaults for this view subtree.

Properties in child views override properties inherited from ancestors.

cursor
Type: string | ExprRef

Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root.

Default value: browser default

data
Type: UrlData | InlineData | NamedData | DynamicCallbackData | LazyData | Generator

Specifies a data source. If omitted, the data source is inherited from the parent view.

datasets
Type: object

Named datasets available to this view and its descendants.

A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.

description
Type: string | string[]

A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.

domainInert
Type: boolean

If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically.

Default value: false

encoding
Type: Encoding

Specifies how data are encoded using the visual channels.

height
Type: SizeDef | number | Step | ExprRef | "container"

Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default value: "container"

legends
Type: object

Defines properties for legend resolutions used by this view subtree.

Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

name
Type: string

An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.

overhang
Type: OverhangConfig

Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible.

Default value: all edges reserve overhang

padding
Type: Paddings | number

Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge.

Examples: - padding: 10 - padding: { top: 10, right: 20, bottom: 10, left: 20 }

Default value: 0

params
Type: array

Dynamic variables that parameterize a visualization.

resolve
Type: object

Specifies how scales, axes, and legends are resolved in the view hierarchy.

If legend resolution is not configured explicitly, it follows the corresponding scale resolution.

scales
Type: object

Defines properties for scale resolutions used by this view subtree.

Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

separator
Type: boolean | SeparatorProps

Draws separator rules between visible child views. The separators are centered within the spacing gaps and do not affect layout.

If true, the defaults are equivalent to: {"type":"rule","size":1,"color":"#ccc","opacity":1,"strokeDash":[4,4],"strokeCap":"butt"} Use includePlotMargin to control whether the separators extend into the plot margin.

Default value: false

spacing
Type: number

The gap between the views, in pixels.

templates
Type: object

TODO

title
Type: string | Title

View title.

transform
Type: array

An array of transformations applied to the data before visual encoding.

viewportHeight
Type: SizeDef | number | ExprRef | "container"

Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as height)

viewportWidth
Type: SizeDef | number | ExprRef | "container"

Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as width)

visible
Type: boolean

The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility.

Default: true

width
Type: SizeDef | number | Step | ExprRef | "container"

Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default: "container"

Contig

name Required
Type: string

TODO

size Required
Type: number

TODO

CoordinateLookupInput

data Required
Type: LazyData

The lazy side data source.

transform
Type: array

Transforms applied to the side data before lookup.

CoreRootSpec

Type: object | object | object | object | object | object

CrossData

Type: UrlData | InlineData | NamedData | Generator

CrossInput

data Required
Type: UrlData | InlineData | NamedData | Generator

Finite eager data crossed with the primary input.

transform
Type: array

Unary transforms applied to the foreign data before crossing.

CsvDataFormat

columns
Type: array

Optional ordered list of field names for headerless CSV or TSV input. When provided, the first row is interpreted as data rather than a header row.

parse
Type: Parse | null

If set to null, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of "number", "boolean", "date", or null (do not parse the field)). For example, "parse": {"modified_on": "date"} parses the modified_on field in each input record a Date value.

For "date", we parse data based using Javascript's Date.parse(). For Specific date formats can be provided (e.g., {foo: "date:'%m%d%Y'"}), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., {foo: "utc:'%m%d%Y'"}). See more about UTC time

type
Type: string

Type of input data: "json", "csv", "tsv", "dsv".

Default value: The default format type is determined by the extension of the file URL. Compression suffixes such as .gz are ignored during inference. If no extension is detected, "json" will be used by default.

Data

Type: UrlData | InlineData | NamedData | DynamicCallbackData | LazyData | Generator

DataFormat

Type: CsvDataFormat | DsvDataFormat | JsonDataFormat | BedDataFormat | BedpeDataFormat | VcfDataFormat | OtherDataFormat

DataSource

Type: UrlData | InlineData | NamedData | DynamicCallbackData | LazyData

DirectionDef

Type: object | object | ValueDef

DomEventType

Type: "click" | "dblclick" | "mouseenter" | "mouseleave" | "mouseover" | "mousemove" | "mousedown" | "wheel" | "pointerover"

DomainValue

Type: number | string | boolean | ExprRef

DomainValueArray

Type: (number | string | boolean | ExprRef)[]

DsvDataFormat

columns
Type: array

Optional ordered list of field names for headerless delimiter-separated input. When provided, the first row is interpreted as data rather than a header row.

delimiter Required
Type: string

The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.

parse
Type: Parse | null

If set to null, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of "number", "boolean", "date", or null (do not parse the field)). For example, "parse": {"modified_on": "date"} parses the modified_on field in each input record a Date value.

For "date", we parse data based using Javascript's Date.parse(). For Specific date formats can be provided (e.g., {foo: "date:'%m%d%Y'"}), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., {foo: "utc:'%m%d%Y'"}). See more about UTC time

DynamicCallbackData

description
Type: string

A description of the data source. Can be used for documentation and to explain the role of the data in the visualization.

dynamicCallbackSource Required
Type: boolean

The View class has getDynamicData() methods that provides the data. This is intended for internal use.

format
Type: CsvDataFormat | DsvDataFormat | JsonDataFormat | BedDataFormat | BedpeDataFormat | VcfDataFormat | OtherDataFormat

An object that specifies the format for parsing the data.

name
Type: string

Provide a placeholder name and bind data at runtime.

DynamicOpacity

channel
Type: "x" | "y" | "auto"

The positional channel whose scale domain controls the opacity. If set to "auto", both x and y scales may contribute.

If omitted, x is used when available and y is used as a fallback.

unitsPerPixel Required
Type: array

Opacity stops expressed as units (base pairs, for example) per pixel. The values must be positive.

Each stop is paired with an opacity in values at the same index. Stops can be constants or expression references.

values Required
Type: array

Opacity values that match the given unitsPerPixel stops.

Values outside the stop range are clamped to the nearest stop.

EventConfig

filter
Type: string

An optional filter expression to further filter events of the specified type. The expression can only refer to the event object as event, and should evaluate to a boolean value indicating whether to include the event. No other data or parameters are in scope.

type Required
Type: "click" | "dblclick" | "mouseenter" | "mouseleave" | "mouseover" | "mousemove" | "mousedown" | "wheel" | "pointerover"

The type of event to listen to. For example, "click" or "mouseenter".

ExprDef

band
Type: number

Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

description
Type: string

A description of the encoded expression. Can be used for documentation and to explain the meaning of the channel mapping.

expr Required
Type: string

An expression. Properties of the data can be accessed through the datum object.

title
Type: string | null

A title for the field. If null, the title will be removed.

type
Type: "quantitative" | "ordinal" | "nominal" | "index" | "locus"

TODO

ExprParameter

description
Type: string

A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.

expr Required
Type: string

An expression for the value of the parameter. This expression may include other parameters, in which case the parameter will automatically update in response to upstream parameter changes.

name Required
Type: string

A unique name for the variable parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or "$", or "_") and may not start with a digit. Reserved keywords that may not be used as parameter names are: "datum".

persist
Type: boolean

Whether the parameter should be persisted in bookmarks and provenance.

This primarily affects GenomeSpy App behavior. Set to false for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing encoding.key.

Default value: true

transition
Type: ParamTransition

Smoothly follows numeric expression output values.

Field

Type: string

FieldDefWithoutScale

description
Type: string

A description of the encoded field. Can be used for documentation and to explain the meaning of the channel mapping.

field
Type: string

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.

See also: field documentation.

Notes: 1) Dots (.) and brackets ([ and ]) can be used to access nested objects (e.g., "field": "foo.bar" and "field": "foo['bar']"). If field names contain dots or brackets but are not nested, you can use \\ to escape dots and brackets (e.g., "a\\.b" and "a\\[0\\]"). See more details about escaping in the field documentation. 2) field is not required if aggregate is count.

title
Type: string | null

A title for the field. If null, the title will be removed.

FieldName

Type: string

FilterParams

Type: ExprFilterParams | SelectionFilterParams

FontStyle

Type: "normal" | "italic"

FontWeight

Type: number | "thin" | "light" | "regular" | "normal" | "medium" | "bold" | "black"

GenomeConfig

Type: UrlGenomeConfig | InlineGenomeConfig | GenomeConfigBase

GenomeConfigBase

name Required
Type: string

Name of the genome assembly, e.g., hg19 or hg38.

GenomeDefinition

Type: UrlGenomeDefinition | InlineGenomeDefinition

HConcatSpec

axes
Type: object

Defines properties for axis resolutions used by this view subtree.

Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

baseUrl
Type: string

The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.

config
Type: GenomeSpyConfig

Configures defaults for this view subtree.

Properties in child views override properties inherited from ancestors.

cursor
Type: string | ExprRef

Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root.

Default value: browser default

data
Type: UrlData | InlineData | NamedData | DynamicCallbackData | LazyData | Generator

Specifies a data source. If omitted, the data source is inherited from the parent view.

datasets
Type: object

Named datasets available to this view and its descendants.

A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.

description
Type: string | string[]

A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.

domainInert
Type: boolean

If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically.

Default value: false

encoding
Type: Encoding

Specifies how data are encoded using the visual channels.

hconcat Required
Type: array

TODO

height
Type: SizeDef | number | Step | ExprRef | "container"

Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default value: "container"

legends
Type: object

Defines properties for legend resolutions used by this view subtree.

Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

name
Type: string

An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.

overhang
Type: OverhangConfig

Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible.

Default value: all edges reserve overhang

padding
Type: Paddings | number

Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge.

Examples: - padding: 10 - padding: { top: 10, right: 20, bottom: 10, left: 20 }

Default value: 0

params
Type: array

Dynamic variables that parameterize a visualization.

resolve
Type: object

Specifies how scales, axes, and legends are resolved in the view hierarchy.

If legend resolution is not configured explicitly, it follows the corresponding scale resolution.

scales
Type: object

Defines properties for scale resolutions used by this view subtree.

Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

separator
Type: boolean | SeparatorProps

Draws separator rules between visible child views. The separators are centered within the spacing gaps and do not affect layout.

If true, the defaults are equivalent to: {"type":"rule","size":1,"color":"#ccc","opacity":1,"strokeDash":[4,4],"strokeCap":"butt"} Use includePlotMargin to control whether the separators extend into the plot margin.

Default value: false

spacing
Type: number

The gap between the views, in pixels.

templates
Type: object

TODO

title
Type: string | Title

View title.

transform
Type: array

An array of transformations applied to the data before visual encoding.

viewportHeight
Type: SizeDef | number | ExprRef | "container"

Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as height)

viewportWidth
Type: SizeDef | number | ExprRef | "container"

Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as width)

visible
Type: boolean

The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility.

Default: true

width
Type: SizeDef | number | Step | ExprRef | "container"

Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default: "container"

HandledTooltip

handler Required
Type: string

TODO

params
Type: object

TODO

IdentifierParams

as
Type: string

Default: "_uniqueId"

description
Type: string

A description of the transform step. Can be used for documentation and agent context.

IndexUrlSourceRef

Type: string | ExprRef | IndexUrlTemplate

IndexUrlTemplate

template Required
Type: string

URL template for index files. Uses the same values and field placeholder as the url template.

InlineDataset

Type: number[] | string[] | boolean[] | object[] | string | object

InlineGenomeConfig

contigs Required
Type: array

An array of contigs/sequences in the genome assembly.

name Required
Type: string

Name of the genome assembly, e.g., hg19 or hg38.

InlineGenomeDefinition

contigs Required
Type: array

An array of contigs/sequences in the genome assembly.

InlineLocusAssembly

Type: UrlGenomeDefinition | InlineGenomeDefinition

InteractionEventType

Type: "click" | "dblclick" | "mouseenter" | "mouseleave" | "mouseover" | "mousemove" | "mousedown" | "wheel"

IntervalSelectionConfig

clear
Type: "click" | "dblclick" | "mouseenter" | "mouseleave" | "mouseover" | "mousemove" | "mousedown" | "wheel" | "pointerover" | EventConfig | string | boolean

A string or object that defines the events that should clear the selection.

Default value: "dblclick"

encodings
Type: array

An array of encoding channels that define the interval selection.

extent
Type: "auto" | "view" | "container"

Visual extent of the interval selection rectangle.

"auto" draws one spanning rectangle when the selected channel can span a concat safely. "view" draws one rectangle per participating view. "container" requires one spanning rectangle.

Default value: "auto"

mark
Type: BrushConfig

Interval selections display a rectangle mark to show the selected range. Use the mark property to adjust the appearance of this rectangle.

on
Type: "click" | "dblclick" | "mouseenter" | "mouseleave" | "mouseover" | "mousemove" | "mousedown" | "wheel" | "pointerover" | EventConfig | string

A string or object that defines the events to which the selection should listen.

Default value:

- point selections: "click" - interval selections: - "mousedown[event.shiftKey]" when any brushed channel is zoomable - "mousedown" otherwise

zoom
Type: "click" | "dblclick" | "mouseenter" | "mouseleave" | "mouseover" | "mousemove" | "mousedown" | "wheel" | "pointerover" | EventConfig | string | boolean

Controls whether an active interval selection can be resized by mouse wheel. The wheel interaction only applies when the cursor is over the interval.

Can be:

- true / false - event type string such as "wheel" or "wheel[event.altKey]" - an EventConfig object

Currently, only "wheel" events are supported.

Default value:

- false when any brushed channel uses a zoomable scale - true otherwise

JsonDataFormat

parse
Type: Parse | null

If set to null, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of "number", "boolean", "date", or null (do not parse the field)). For example, "parse": {"modified_on": "date"} parses the modified_on field in each input record a Date value.

For "date", we parse data based using Javascript's Date.parse(). For Specific date formats can be provided (e.g., {foo: "date:'%m%d%Y'"}), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., {foo: "utc:'%m%d%Y'"}). See more about UTC time

property
Type: string

The JSON property containing the desired data. This parameter can be used when the loaded JSON file may have surrounding structure or meta-data. For example "property": "values.features" is equivalent to retrieving json.values.features from the loaded JSON object.

KeyDef

Type: FieldDefWithoutScale | FieldDefWithoutScale[]

LayerSpec

axes
Type: object

Defines properties for axis resolutions used by this view subtree.

Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

baseUrl
Type: string

The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.

config
Type: GenomeSpyConfig

Configures defaults for this view subtree.

Properties in child views override properties inherited from ancestors.

cursor
Type: string | ExprRef

Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root.

Default value: browser default

data
Type: UrlData | InlineData | NamedData | DynamicCallbackData | LazyData | Generator

Specifies a data source. If omitted, the data source is inherited from the parent view.

datasets
Type: object

Named datasets available to this view and its descendants.

A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.

description
Type: string | string[]

A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.

domainInert
Type: boolean

If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically.

Default value: false

encoding
Type: Encoding

Specifies how data are encoded using the visual channels.

height
Type: SizeDef | number | Step | ExprRef | "container"

Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default value: "container"

layer Required
Type: array

TODO

legends
Type: object

Defines properties for legend resolutions used by this view subtree.

Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

name
Type: string

An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.

opacity
Type: number | DynamicOpacity | ExprRef

Opacity of the view and all its children.

This can be:

- a fixed number between 0 and 1 - an expression reference (ExprRef) - a DynamicOpacity definition for zoom-dependent opacity

Dynamic opacity is useful for semantic zooming where layers are faded in and out as the user zooms.

Example:

json "opacity": { "unitsPerPixel": [100000, 40000], "values": [0, 1] }

In this example, the view fades in while zooming in from 100 000 to 40 000 units per pixel.

Default value: 1.0

overhang
Type: OverhangConfig

Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible.

Default value: all edges reserve overhang

padding
Type: Paddings | number

Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge.

Examples: - padding: 10 - padding: { top: 10, right: 20, bottom: 10, left: 20 }

Default value: 0

params
Type: array

Dynamic variables that parameterize a visualization.

resolve
Type: object

Specifies how scales, axes, and legends are resolved in the view hierarchy.

If legend resolution is not configured explicitly, it follows the corresponding scale resolution.

scales
Type: object

Defines properties for scale resolutions used by this view subtree.

Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

templates
Type: object

TODO

title
Type: string | Title

View title.

transform
Type: array

An array of transformations applied to the data before visual encoding.

view
Type: ViewBackground

TODO

viewportHeight
Type: SizeDef | number | ExprRef | "container"

Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as height)

viewportWidth
Type: SizeDef | number | ExprRef | "container"

Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as width)

visible
Type: boolean

The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility.

Default: true

width
Type: SizeDef | number | Step | ExprRef | "container"

Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default: "container"

LazyDataParams

Type: AxisTicksData | object | object | object | AxisGenomeData | IndexedFastaData | BigWigData | BigBedData | BamData | TabixTsvData | Gff3Data | VcfData

LegendDirection

Type: "vertical" | "horizontal"

LegendOrient

Type: "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right"

LegendTitleOrient

Type: "top" | "bottom" | "left" | "right"

LerpTransition

epsilon
Type: number

Distance from the target at which the current value snaps to the target.

Default value: 0.01

halfLife
Type: number

Time in milliseconds for the remaining distance to the target to halve.

Default value: 80

LookupSelfInput

MarkPropExprDef

band
Type: number

Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

description
Type: string

A description of the encoded expression. Can be used for documentation and to explain the meaning of the channel mapping.

domainInert
Type: boolean

Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level domainInert when an entire subtree should be excluded.

Default value: false

expr Required
Type: string

An expression. Properties of the data can be accessed through the datum object.

legend
Type: Legend | null

Legend properties for the encoding channel. If null, the legend for the channel is removed. If an object is provided, a legend is created even when legends are disabled by default in the config.

Default value: If undefined, configured legend defaults are applied.

resolutionChannel
Type: "x" | "y" | "x2" | "y2" | "color" | "fill" | "stroke" | "opacity" | "fillOpacity" | "strokeOpacity" | "strokeWidth" | "size" | "shape" | "direction" | "angle" | "dx" | "dy"

An alternative channel for scale resolution.

This is mainly for internal use and allows using color channel to resolve fill and stroke channels under certain circumstances.

scale
Type: Scale | null

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 null, the scale will be disabled and the data value will be directly encoded.

Default value: If undefined, default scale properties are applied.

See also: scale documentation.

title
Type: string | null

A title for the field. If null, the title will be removed.

type Required
Type: "quantitative" | "ordinal" | "nominal" | "index" | "locus"

TODO

MarkProps

Type: RectProps | ArrowProps | TextProps | RuleProps | TickProps | LinkProps | PointProps

MarkType

Type: "rect" | "point" | "rule" | "tick" | "text" | "link" | "arrow"

MergeFacetsParams

description
Type: string

A description of the transform step. Can be used for documentation and agent context.

MultiUrlSourceRef

Type: string | string[] | ExprRef | UrlTemplate

MultiscaleSpec

axes
Type: object

Defines properties for axis resolutions used by this view subtree.

Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

baseUrl
Type: string

The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.

config
Type: GenomeSpyConfig

Configures defaults for this view subtree.

Properties in child views override properties inherited from ancestors.

cursor
Type: string | ExprRef

Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root.

Default value: browser default

data
Type: UrlData | InlineData | NamedData | DynamicCallbackData | LazyData | Generator

Specifies a data source. If omitted, the data source is inherited from the parent view.

datasets
Type: object

Named datasets available to this view and its descendants.

A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.

description
Type: string | string[]

A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.

domainInert
Type: boolean

If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically.

Default value: false

encoding
Type: Encoding

Specifies how data are encoded using the visual channels.

height
Type: SizeDef | number | Step | ExprRef | "container"

Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default value: "container"

legends
Type: object

Defines properties for legend resolutions used by this view subtree.

Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

multiscale Required
Type: array

TODO

name
Type: string

An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.

opacity
Type: number | DynamicOpacity | ExprRef

Opacity of the view and all its children.

This can be:

- a fixed number between 0 and 1 - an expression reference (ExprRef) - a DynamicOpacity definition for zoom-dependent opacity

Dynamic opacity is useful for semantic zooming where layers are faded in and out as the user zooms.

Example:

json "opacity": { "unitsPerPixel": [100000, 40000], "values": [0, 1] }

In this example, the view fades in while zooming in from 100 000 to 40 000 units per pixel.

Default value: 1.0

overhang
Type: OverhangConfig

Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible.

Default value: all edges reserve overhang

padding
Type: Paddings | number

Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge.

Examples: - padding: 10 - padding: { top: 10, right: 20, bottom: 10, left: 20 }

Default value: 0

params
Type: array

Dynamic variables that parameterize a visualization.

resolve
Type: object

Specifies how scales, axes, and legends are resolved in the view hierarchy.

If legend resolution is not configured explicitly, it follows the corresponding scale resolution.

scales
Type: object

Defines properties for scale resolutions used by this view subtree.

Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

stops Required
Type: (number | ExprRef)[] | FadedMultiscaleStops | TransitionedMultiscaleStops

Stop definition that controls transitions between the multiscale levels.

- number[] is shorthand for { metric: "unitsPerPixel", values: ... } - (number | ExprRef)[] supports mixed constants and expressions - Object form allows configuring metric, channel, and fade.

templates
Type: object

TODO

title
Type: string | Title

View title.

transform
Type: array

An array of transformations applied to the data before visual encoding.

view
Type: ViewBackground

TODO

viewportHeight
Type: SizeDef | number | ExprRef | "container"

Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as height)

viewportWidth
Type: SizeDef | number | ExprRef | "container"

Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as width)

visible
Type: boolean

The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility.

Default: true

width
Type: SizeDef | number | Step | ExprRef | "container"

Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default: "container"

MultiscaleStops

Type: FadedMultiscaleStops | TransitionedMultiscaleStops

MultiscaleStopsDef

Type: (number | ExprRef)[] | FadedMultiscaleStops | TransitionedMultiscaleStops

NamedGenomeConfig

Type: UrlGenomeDefinition | InlineGenomeDefinition | object

NumericDomain

Type: number[]

NumericMarkPropDef

Type: FieldOrDatumDefWithCondition,number> | FieldOrDatumDefWithCondition | MarkPropExprDef | ValueDefWithCondition

NumericStopDef

Type: number | ExprRef

NumericValueDef

description
Type: string

A description of the encoded value. Can be used for documentation and to explain the meaning of the channel mapping.

title
Type: string | null

A title for the field. If null, the title will be removed.

value Required
Type: number | ExprRef

A constant value in visual domain (e.g., "red" / "#0099ff", values between 0 to 1 for opacity).

OtherDataFormat

parse
Type: Parse | null

If set to null, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of "number", "boolean", "date", or null (do not parse the field)). For example, "parse": {"modified_on": "date"} parses the modified_on field in each input record a Date value.

For "date", we parse data based using Javascript's Date.parse(). For Specific date formats can be provided (e.g., {foo: "date:'%m%d%Y'"}), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., {foo: "utc:'%m%d%Y'"}). See more about UTC time

type Required
Type: string

Type of input data: "json", "csv", "tsv", "dsv".

Default value: The default format type is determined by the extension of the file URL. Compression suffixes such as .gz are ignored during inference. If no extension is detected, "json" will be used by default.

OverhangConfig

bottom
Type: boolean

TODO

left
Type: boolean

TODO

right
Type: boolean

TODO

top
Type: boolean

TODO

PackLegendLabelsParams

columnPadding
Type: number

Padding between columns in pixels.

Default: 0

columns
Type: number

The number of columns in which to arrange entries.

description
Type: string

A description of the transform step. Can be used for documentation and agent context.

direction
Type: string

The direction in which entries are laid out.

Default: "vertical"

fontSize
Type: number

Label font size in pixels.

Default: 10

labelOffset
Type: number

Offset between the symbol and label in pixels.

Default: 0

labelWidth Required
Type: string (field name)

The field that contains measured label width in pixels.

rowPadding
Type: number

Padding between rows in pixels.

Default: 0

symbolOffset
Type: number

Horizontal offset for generated symbol coordinates in pixels.

Default: 0

symbolSize
Type: number | string (field name)

Symbol size in pixels squared, or a field containing per-entry symbol sizes in pixels squared.

Default: 100

symbolStrokeWidth
Type: number | string (field name)

Symbol stroke width in pixels, or a field containing per-entry stroke widths in pixels.

Default: 0

xOffset
Type: number

Horizontal offset for all generated entry coordinates in pixels.

Default: 0

yExtent
Type: number | ExprRef

Height of the pixel-space layout area. When provided, the transform also emits inverted y coordinates for GenomeSpy's unit y range.

yOffset
Type: number

Vertical offset for all generated entry coordinates in pixels.

Default: 0

PaddingConfig

Type: Paddings | number

Paddings

bottom
Type: number

TODO

left
Type: number

TODO

right
Type: number

TODO

top
Type: number

TODO

Parameter

Type: PlainValueParameter | TransitionedValueParameter | ExprParameter | SelectionParameter | RulerParameter

Parse

Type: object

ParseValue

Type: string | null

PlainValueParameter

bind
Type: BindCheckbox | BindRadioSelect | BindRange | BindInput

Binds the parameter to an external input element such as a slider, selection list or radio button group.

description
Type: string

A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.

name Required
Type: string

A unique name for the variable parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or "$", or "_") and may not start with a digit. Reserved keywords that may not be used as parameter names are: "datum".

persist
Type: boolean

Whether the parameter should be persisted in bookmarks and provenance.

This primarily affects GenomeSpy App behavior. Set to false for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing encoding.key.

Default value: true

value
The initial value of the parameter.

Default value: undefined

PointSelectionConfig

clear
Type: "click" | "dblclick" | "mouseenter" | "mouseleave" | "mouseover" | "mousemove" | "mousedown" | "wheel" | "pointerover" | EventConfig | string | boolean

A string or object that defines the events that should clear the selection.

Default value: "dblclick"

on
Type: "click" | "dblclick" | "mouseenter" | "mouseleave" | "mouseover" | "mousemove" | "mousedown" | "wheel" | "pointerover" | EventConfig | string

A string or object that defines the events to which the selection should listen.

Default value:

- point selections: "click" - interval selections: - "mousedown[event.shiftKey]" when any brushed channel is zoomable - "mousedown" otherwise

toggle
Type: boolean

Controls whether data values should be toggled (inserted or removed from a point selection) when clicking with the shift key pressed.

- true -- additional values can be selected by shift-clicking. - false -- only a single value can be selected at a time.

Default value: true

Position2Def

Type: object | SecondaryChromPosDef | object | object | PositionValueDef

PositionDatumDef

axis
Type: GenomeAxis | null

An object defining properties of axis's gridlines, ticks and labels. If null, the axis for the encoding channel will be removed.

Default value: If undefined, default axis properties are applied.

See also: axis documentation.

band
Type: number

Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

datum
Type: Scalar | ExprRef

A constant value in data domain.

description
Type: string

A description of the encoded datum. Can be used for documentation and to explain the meaning of the channel mapping.

domainInert
Type: boolean

Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level domainInert when an entire subtree should be excluded.

Default value: false

resolutionChannel
Type: "x" | "y" | "x2" | "y2" | "color" | "fill" | "stroke" | "opacity" | "fillOpacity" | "strokeOpacity" | "strokeWidth" | "size" | "shape" | "direction" | "angle" | "dx" | "dy"

An alternative channel for scale resolution.

This is mainly for internal use and allows using color channel to resolve fill and stroke channels under certain circumstances.

scale
Type: Scale | null

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 null, the scale will be disabled and the data value will be directly encoded.

Default value: If undefined, default scale properties are applied.

See also: scale documentation.

title
Type: string | null

A title for the field. If null, the title will be removed.

type Required
Type: "quantitative" | "ordinal" | "nominal" | "index" | "locus"

TODO

PositionDef

Type: PositionFieldDef | ChromPosDef | PositionDatumDef | PositionExprDef | PositionValueDef

PositionExprDef

axis
Type: GenomeAxis | null

An object defining properties of axis's gridlines, ticks and labels. If null, the axis for the encoding channel will be removed.

Default value: If undefined, default axis properties are applied.

See also: axis documentation.

band
Type: number

Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

description
Type: string

A description of the encoded expression. Can be used for documentation and to explain the meaning of the channel mapping.

domainInert
Type: boolean

Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level domainInert when an entire subtree should be excluded.

Default value: false

expr Required
Type: string

An expression. Properties of the data can be accessed through the datum object.

title
Type: string | null

A title for the field. If null, the title will be removed.

type Required
Type: "quantitative" | "ordinal" | "nominal" | "index" | "locus"

TODO

PositionFieldDef

axis
Type: GenomeAxis | null

An object defining properties of axis's gridlines, ticks and labels. If null, the axis for the encoding channel will be removed.

Default value: If undefined, default axis properties are applied.

See also: axis documentation.

band
Type: number

Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

description
Type: string

A description of the encoded field. Can be used for documentation and to explain the meaning of the channel mapping.

domainInert
Type: boolean

Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level domainInert when an entire subtree should be excluded.

Default value: false

field
Type: string

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.

See also: field documentation.

Notes: 1) Dots (.) and brackets ([ and ]) can be used to access nested objects (e.g., "field": "foo.bar" and "field": "foo['bar']"). If field names contain dots or brackets but are not nested, you can use \\ to escape dots and brackets (e.g., "a\\.b" and "a\\[0\\]"). See more details about escaping in the field documentation. 2) field is not required if aggregate is count.

resolutionChannel
Type: "x" | "y" | "x2" | "y2" | "color" | "fill" | "stroke" | "opacity" | "fillOpacity" | "strokeOpacity" | "strokeWidth" | "size" | "shape" | "direction" | "angle" | "dx" | "dy"

An alternative channel for scale resolution.

This is mainly for internal use and allows using color channel to resolve fill and stroke channels under certain circumstances.

scale
Type: Scale | null

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 null, the scale will be disabled and the data value will be directly encoded.

Default value: If undefined, default scale properties are applied.

See also: scale documentation.

title
Type: string | null

A title for the field. If null, the title will be removed.

type Required
Type: "quantitative" | "ordinal" | "nominal" | "index" | "locus"

TODO

PositionValueDef

description
Type: string

A description of the encoded value. Can be used for documentation and to explain the meaning of the channel mapping.

title
Type: string | null

A title for the field. If null, the title will be removed.

value Required
Type: number | ExprRef

A constant value in visual domain (e.g., "red" / "#0099ff", values between 0 to 1 for opacity).

PositionalChannel

Type: "x" | "y" | "x2" | "y2"

PrimaryPositionalChannel

Type: "x" | "y"

ResolutionBehavior

Type: "independent" | "shared" | "excluded" | "forced"

RulerChannelValue

Type: Scalar | ChromosomalLocus | null

RulerClear

Type: mouseleave | mouseup | False

RulerDisplay

Type: "line" | "center" | "band" | "none"

RulerEventConfig

filter
Type: string

Optional filter expression that must evaluate to true before the event updates the ruler.

type Required
Type: "mousemove" | "mousedown"

Event that updates a pointer-driven ruler.

RulerEventType

Type: "mousemove" | "mousedown"

RulerExtent

Type: "auto" | "view" | "container"

RulerInitMapping

x
Type: Scalar | ChromosomalLocus | null

TODO

y
Type: Scalar | ChromosomalLocus | null

TODO

RulerMarkConfig

fill
Type: string

Fill color for display: "band".

fillOpacity
Type: number

Fill opacity for display: "band".

opacity
Type: number

Opacity of ruler lines and bands.

shadowBlur
Type: number | ExprRef

The blur radius of the drop shadow in pixels. Higher values produce a more diffuse shadow.

Default value: 0

shadowColor
Type: string | ExprRef

The color of the drop shadow. Any valid CSS color string is allowed.

Default value: "black"

shadowOffsetX
Type: number | ExprRef

The horizontal offset of the drop shadow in pixels. Positive values move the shadow to the right.

Default value: 0

shadowOffsetY
Type: number | ExprRef

The vertical offset of the drop shadow in pixels. Positive values move the shadow downward.

Default value: 0

shadowOpacity
Type: number | ExprRef

The opacity of the drop shadow. Value between 0 (fully transparent) and 1 (fully opaque).

Default value: 0 (disabled)

stroke
Type: string

Stroke color of ruler lines and band outlines.

strokeDash
Type: array

Alternating stroke and gap lengths for dashed ruler lines and band outlines.

strokeWidth
Type: number

Stroke width of ruler lines and band outlines, in pixels.

zindex
Type: number

Z-order relative to the view content.

Values greater than 0 render after the view marks. Values less than or equal to 0 render before the marks. The default value depends on the element type.

RulerParameter

description
Type: string

A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.

name Required
Type: string

A unique name for the variable parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or "$", or "_") and may not start with a digit. Reserved keywords that may not be used as parameter names are: "datum".

persist
Type: boolean

Whether the parameter should be persisted in bookmarks and provenance.

This primarily affects GenomeSpy App behavior. Set to false for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing encoding.key.

Default value: true

ruler Required
Type: RulerConfig

Tracks a domain coordinate and displays it as a ruler in compatible views.

value
Type: RulerInitMapping

Initial ruler value.

RulerSnap

Type: auto | integer | False

RulerSource

Type: "pointer" | "viewport"

Scalar

Type: string | number | boolean

ScalarDomain

Type: NumericDomain | string[] | boolean[]

Scale

align
Type: number

The alignment of the steps within the scale range.

This value must lie in the range [0,1]. A value of 0.5 indicates that the steps should be centered within the range. A value of 0 or 1 may be used to shift the bands to one side, say to position them adjacent to an axis.

Default value: 0.5

assembly
Type: string | InlineLocusAssembly

Genome assembly definition for locus scales.

This can be:

- A string reference to a named assembly (built-in or root-configured). - An inline anonymous assembly that defines either contigs or url.

If undefined, the default genome from the genome store is used.

base
Type: number

The logarithm base of the log scale (default 10).

bins
Type: array

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.

clamp
Type: boolean

If true, values that exceed the data domain are clamped to either the minimum or maximum range value

Default value: derived from the scale config's clamp (true by default).

constant
Type: number

A constant determining the slope of the symlog function around zero. Only used for symlog scales.

Default value: 1

domain
Type: NumericDomain | string[] | boolean[] | ComplexDomain | SelectionDomainRef | ExprRef | DomainValueArray

Customized domain values.

For quantitative fields, domain can take the form of a two-element array with minimum and maximum values. Piecewise scales can be created by providing a domain with more than two entries.

For temporal fields, domain can be a two-element array minimum and maximum values, in the form of either timestamps or the DateTime definition objects.

For ordinal and nominal fields, domain can be an array that lists valid input values.

The domain can also be defined by an expression reference that evaluates to the domain array. Array elements may also be expression references.

domainMax
Type: number

Sets the maximum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.

domainMid
Type: number

Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for diverging color scales. The domainMid property is only intended for use with scales supporting continuous, piecewise domains.

domainMin
Type: number

Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.

domainTransition
Type: boolean | object

Controls whether domain updates are applied immediately or with a smooth transition.

Set this to false to apply domain updates immediately. The default is true, except for domains that include ExprRefs, which default to false unless overridden.

Default value: true, except false for ExprRef-driven domains.

exponent
Type: number

The exponent of the pow scale.

interpolate
Type: "rgb" | "lab" | "hcl" | "hsl" | "hsl-long" | "hcl-long" | "cubehelix" | "cubehelix-long" | ScaleInterpolateParams

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 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.

Default value: hcl

name
Type: string

The name of the scale. Names are optional but allow the scales to be referenced and found with the API.

nice
Type: boolean | number | object

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].

For quantitative scales such as linear, nice can be either a boolean flag or a number. If nice is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain.

Default value: true for unbinned quantitative fields; false otherwise.

numberingOffset
Type: number

The numbering offset used when formatting tick labels on index and locus scales.

Default value: 0

padding
Type: number

For continuous scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the zero, nice, domainMin, and domainMax properties.

For band scales, shortcut for setting paddingInner and paddingOuter to the same value.

For point scales, alias for paddingOuter.

Default value: For continuous scales, derived from the scale config's continuousPadding. For band and point scales, see paddingInner and paddingOuter. By default, Vega-Lite sets padding such that width/height = number of unique values * step.

paddingInner
Type: number

The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].

For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands).

Default value: derived from the scale config's bandPaddingInner.

paddingOuter
Type: number

The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1].

Default value: derived from the scale config's bandPaddingOuter for band scales and pointPadding for point scales. By default, Vega-Lite sets outer padding such that width/height = number of unique values * step.

range
Type: {'anyOf': [{'type': 'number'}, {'type': 'string'}, {'$ref': '#/definitions/ExprRef'}]}[] | string

The range of the scale. One of:

- A string indicating a pre-defined named scale range (e.g., example, "symbol", or "diverging").

- For continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a piecewise scale. Array elements may also be expression references.

- For discrete and discretizing scales, an array of desired output values. Array elements may also be expression references.

Notes:

1) For color scales you can also specify a color scheme instead of range.

2) Any directly specified range for x and y channels will be ignored. Range can be customized via the view's corresponding size (width and height).

reverse
Type: boolean

If true, reverses the order of the scale range.

Default value: false.

round
Type: boolean

If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.

Default value: false.

scheme
Type: string | SchemeParams

A string indicating a color scheme name (e.g., "category10" or "blues") or a scheme parameter object.

Discrete color schemes may be used with discrete or discretizing scales. Continuous color schemes are intended for use with color scales.

For the full list of supported schemes, please refer to the Vega Scheme reference.

type
Type: "null" | "linear" | "log" | "pow" | "sqrt" | "symlog" | "identity" | "sequential" | "quantize" | "threshold" | "ordinal" | "point" | "band" | "index" | "locus"

The type of scale. Vega-Lite supports the following categories of scale types:

1) Continuous Scales -- mapping continuous domains to continuous output ranges ("linear", "pow", "sqrt", "symlog", "log", "time", "utc".

2) Discrete Scales -- mapping discrete domains to discrete ("ordinal") or continuous ("band" and "point") output ranges.

3) Discretizing Scales -- mapping continuous domains to discrete output ranges "bin-ordinal", "quantile", "quantize" and "threshold".

Default value: please see the scale type table.

zero
Type: boolean

If true, ensures that a zero baseline value is included in the scale domain.

Default value: true for x and y channels if the quantitative field is not binned and no custom domain is provided; false otherwise.

Note: Log, time, and utc scales do not support zero.

zoom
Type: boolean | ZoomParams

If true and the scale is used on a positional channel, it can bee zoomed and translated interactively.

ScaleInterpolate

Type: "rgb" | "lab" | "hcl" | "hsl" | "hsl-long" | "hcl-long" | "cubehelix" | "cubehelix-long"

ScaleInterpolateParams

gamma
Type: number

TODO

type Required
Type: string

TODO

ScaleType

Type: "null" | "linear" | "log" | "pow" | "sqrt" | "symlog" | "identity" | "sequential" | "quantize" | "threshold" | "ordinal" | "point" | "band" | "index" | "locus"

SchemeParams

count
Type: number

The number of colors to use in the scheme. This can be useful for scale types such as "quantize", which use the length of the scale range to determine the number of discrete bins for the scale domain.

extent
Type: array

The extent of the color range to use. For example [0.2, 1] will rescale the color scheme such that color values in the range [0, 0.2) are excluded from the scheme.

name Required
Type: string

A color scheme name for ordinal scales (e.g., "category10" or "blues").

For the full list of supported schemes, please refer to the Vega Scheme reference.

SearchDef

Type: FieldDefWithoutScale | FieldDefWithoutScale[]

SecondaryChromPosDef

axis
Type: GenomeAxis | null

An object defining properties of axis's gridlines, ticks and labels. If null, the axis for the encoding channel will be removed.

Default value: If undefined, default axis properties are applied.

See also: axis documentation.

band
Type: number

Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

chrom Required
Type: FieldName

The field having the chromosome or contig.

description
Type: string

A description of the encoded position. Can be used for documentation and to explain the meaning of the channel mapping.

domainInert
Type: boolean

Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level domainInert when an entire subtree should be excluded.

Default value: false

offset
Type: number

An offset or offsets that allow for adjusting the numbering base. The offset is subtracted from the positions.

GenomeSpy uses internally zero-based indexing with half-open intervals. UCSC-based formats (BED, etc.) generally use this scheme. However, for example, VCF files use one-based indexing and must be adjusted by setting the offset to 1.

Default: 0

pos
Type: FieldName

The field having an intra-chromosomal position.

title
Type: string | null

A title for the field. If null, the title will be removed.

SecondaryPositionalChannel

Type: "x2" | "y2"

SelectionExtent

Type: "auto" | "view" | "container"

SelectionInitIntervalMapping

x
Type: array

TODO

y
Type: array

TODO

SelectionType

Type: "point" | "interval"

SeparatorProps

buildIndex
Type: boolean

Whether the x channel should build an index for efficient subset rendering. If omitted, GenomeSpy enables indexing automatically for positional x encodings.

clip
Type: boolean | "x" | "y" | "never"

Controls whether the mark is clipped to the UnitView's rectangle. The values "x" and "y" clip only in the corresponding screen-space direction. Inherited clipping from parent containers still applies unless "never" is used.

Default value: the direction of zoomable positional scales

color
Type: string | ExprRef

Color of the mark. Affects either fill or stroke, depending on the filled property.

cullByVisibleRange
Type: boolean | "x" | "y"

Hide point-like mark instances whose anchor falls outside the inherited visible range in the given screen-space direction.

cursor
Type: string | ExprRef

Mouse cursor shown while the pointer is over the mark. Mark cursor takes precedence over enclosing view cursors.

Default value: browser default

includePlotMargin
Type: boolean

Whether separators extend into the plot margin (axes/padding) around the grid.

Default value: true

minBufferSize
Type: number

Minimum size for WebGL buffers (number of data items). Allows for using bufferSubData() to update graphics.

This property is intended for internal use.

minLength
Type: number | ExprRef

The minimum stroke length in pixels. Use this property to ensure that very short strokes remain visible even when the user zooms out.

Default value: 0

opacity
Type: number | ExprRef

Opacity of the mark. Affects fillOpacity or strokeOpacity, depending on the filled property.

size
Type: number | ExprRef

Stroke width of "link" and "rule" marks in pixels, the area of the bounding square of "point" mark, or the font size of "text" mark.

strokeCap
Type: "butt" | "square" | "round" | ExprRef

The style of stroke ends. Available choices: "butt", "round", and "square".

Default value: "butt"

strokeDash
Type: array

An array of of alternating stroke and gap lengths or null for solid strokes.

Default value: null

strokeDashOffset
Type: number

An offset for the stroke dash pattern.

Default value: 0

style
Type: string | string[]

Named style reference(s) resolved from config.style. If an array is provided, later styles override earlier ones.

tooltip
Type: HandledTooltip | null | boolean

Tooltip handler. If null, no tooltip is shown. If string, specifies the tooltip handler to use.

x
Type: number | ExprRef

Position on the x axis.

x2
Type: number | ExprRef

The secondary position on the x axis.

xOffset
Type: number

Offsets of the x and x2 coordinates in pixels. The offset is applied after the viewport scaling and translation.

Default value: 0

y
Type: number | ExprRef

Position on the y axis.

y2
Type: number | ExprRef

The secondary position on the y axis.

yOffset
Type: number

Offsets of the y and y2 coordinates in pixels. The offset is applied after the viewport scaling and translation.

Default value: 0

zindex
Type: number

Z-order of the separator relative to the view content.

Values greater than 0 render after the view marks. Values less than or equal to 0 render before the marks.

Default value: 0

SequenceGenerator

description
Type: string

A description of the data source. Can be used for documentation and to explain the role of the generated data in the visualization.

name
Type: string

Provide a placeholder name and bind data at runtime.

sequence Required
Type: SequenceParams

Generate a sequence of numbers.

SequenceParams

as
Type: FieldName | ExprRef

The name of the generated sequence field.

Default value: "data"

start Required
Type: number | ExprRef

The starting value of the sequence (inclusive).

step
Type: number | ExprRef

The step value between sequence entries.

Default value: 1

stop Required
Type: number | ExprRef

The ending value of the sequence (exclusive).

ShapeDef

Type: FieldOrDatumDefWithCondition,(string|null)> | FieldOrDatumDefWithCondition | MarkPropExprDef | ValueDefWithCondition<(string|null),TypeForShape>

SingleUrlSourceRef

Type: string | ExprRef | UrlTemplate

SortOrder

Type: "ascending" | "descending"

StringDatumDef

band
Type: number

Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to 0, and at the middle of the band if set to 0.5.

datum
Type: Scalar | ExprRef

A constant value in data domain.

description
Type: string

A description of the encoded datum. Can be used for documentation and to explain the meaning of the channel mapping.

format
Type: string

When used with the default "number" format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.

- If the format type is "number" (e.g., for quantitative fields), this is D3's number format pattern.

See the format documentation for more examples.

resolutionChannel
Type: "x" | "y" | "x2" | "y2" | "color" | "fill" | "stroke" | "opacity" | "fillOpacity" | "strokeOpacity" | "strokeWidth" | "size" | "shape" | "direction" | "angle" | "dx" | "dy"

An alternative channel for scale resolution.

This is mainly for internal use and allows using color channel to resolve fill and stroke channels under certain circumstances.

scale
Type: Scale | null

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 null, the scale will be disabled and the data value will be directly encoded.

Default value: If undefined, default scale properties are applied.

See also: scale documentation.

title
Type: string | null

A title for the field. If null, the title will be removed.

type
Type: "quantitative" | "ordinal" | "nominal" | "index" | "locus"

TODO

StringFieldDef

Type: object | object

TextDef

Type: object | object | StringDatumDef | ExprDef | ValueDef

TitleAnchor

Type: None | start | middle | end

TitleFrame

Type: "bounds" | "group"

TitleOrient

Type: "none" | "left" | "right" | "top" | "bottom"

Tooltip

Type: HandledTooltip | null | boolean

TooltipDef

Type: object | object | StringDatumDef | ExprDef | ValueDef | (object | object | StringDatumDef | ExprDef | ValueDef)[] | null

TransformParams

Type: AlignmentMismatchesParams | AggregateParams | CollectParams | CoverageParams | CoordinateLookupParams | CrossParams | FlattenDelimitedParams | FormulaParams | LookupParams | ExprFilterParams | SelectionFilterParams | FilterScoredLabelsParams | FlattenParams | FlattenCompressedExonsParams | FlattenCigarParams | FlattenSequenceParams | IdentifierParams | LinearizeGenomicCoordinateParams | MeasureTextParams | TruncateTextParams | PackLegendLabelsParams | MergeFacetsParams | PileupParams | ProjectParams | RegexExtractParams | RegexFoldParams | SampleParams | SetIntersectionParams | StackParams | WindowParams

TransitionedValueParameter

bind
Type: BindCheckbox | BindRadioSelect | BindRange | BindInput

Binds the parameter to an external input element such as a slider, selection list or radio button group.

description
Type: string

A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.

name Required
Type: string

A unique name for the variable parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or "$", or "_") and may not start with a digit. Reserved keywords that may not be used as parameter names are: "datum".

persist
Type: boolean

Whether the parameter should be persisted in bookmarks and provenance.

This primarily affects GenomeSpy App behavior. Set to false for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing encoding.key.

Default value: true

transition Required
Type: ParamTransition

Smoothly follows numeric target values.

value Required
Type: number

The finite numeric initial target value of the transitioned parameter.

TruncateTextParams

as
Type: string

The output field where the truncated text is written.

Default: Same as field.

description
Type: string

A description of the transform step. Can be used for documentation and agent context.

ellipsis
Type: string

Text appended after truncation.

Default: "...".

field Required
Type: string (field name)

The field that contains the text to be truncated.

font
Type: string

The font typeface. Uses the same asynchronously loaded SDF fonts as the "text" mark.

Default: "Lato"

fontSize Required
Type: number

The font size in pixels.

fontStyle
Type: "normal" | "italic"

The font style. Valid values: "normal" and "italic".

Default: "normal"

fontWeight
Type: number | "thin" | "light" | "regular" | "normal" | "medium" | "bold" | "black"

The font weight.

Default: "regular"

limit
Type: number

Maximum text width in pixels.

Type

Type: "quantitative" | "ordinal" | "nominal" | "index" | "locus"

TypeForShape

Type: "ordinal" | "nominal"

UrlGenomeConfig

name Required
Type: string

Name of the genome assembly, e.g., hg19 or hg38.

url Required
Type: string

A URL to a chrom.sizes file, which is a tab-separated file with two columns: the sequence name and its size.

You may want to strip alternative loci, haplotypes, and other non-canonical contigs from the file.

Example: "https://genomespy.app/data/genomes/hg19/chrom.sizes"

UrlGenomeDefinition

url Required
Type: string

A URL to a chrom.sizes file, which is a tab-separated file with two columns: the sequence name and its size.

You may want to strip alternative loci, haplotypes, and other non-canonical contigs from the file.

Example: "https://genomespy.app/data/genomes/hg19/chrom.sizes"

UrlList

type
Type: string

The format of the data in the list. If the type is "json", the list is expected to be an array of strings. If the type is "csv" or "tsv", the list is expected to be a table with a single column named url.

Default value: "txt"

urlsFromFile Required
Type: string

A URL that returns a list of URLs to load the data set. The URLs in the list can be absolute or relative to the URL of the list.

UrlSourceRef

Type: string | string[] | ExprRef | UrlList | UrlTemplate

VConcatSpec

axes
Type: object

Defines properties for axis resolutions used by this view subtree.

Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

baseUrl
Type: string

The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.

config
Type: GenomeSpyConfig

Configures defaults for this view subtree.

Properties in child views override properties inherited from ancestors.

cursor
Type: string | ExprRef

Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root.

Default value: browser default

data
Type: UrlData | InlineData | NamedData | DynamicCallbackData | LazyData | Generator

Specifies a data source. If omitted, the data source is inherited from the parent view.

datasets
Type: object

Named datasets available to this view and its descendants.

A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.

description
Type: string | string[]

A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.

domainInert
Type: boolean

If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically.

Default value: false

encoding
Type: Encoding

Specifies how data are encoded using the visual channels.

height
Type: SizeDef | number | Step | ExprRef | "container"

Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default value: "container"

legends
Type: object

Defines properties for legend resolutions used by this view subtree.

Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

name
Type: string

An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.

overhang
Type: OverhangConfig

Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible.

Default value: all edges reserve overhang

padding
Type: Paddings | number

Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge.

Examples: - padding: 10 - padding: { top: 10, right: 20, bottom: 10, left: 20 }

Default value: 0

params
Type: array

Dynamic variables that parameterize a visualization.

resolve
Type: object

Specifies how scales, axes, and legends are resolved in the view hierarchy.

If legend resolution is not configured explicitly, it follows the corresponding scale resolution.

scales
Type: object

Defines properties for scale resolutions used by this view subtree.

Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.

separator
Type: boolean | SeparatorProps

Draws separator rules between visible child views. The separators are centered within the spacing gaps and do not affect layout.

If true, the defaults are equivalent to: {"type":"rule","size":1,"color":"#ccc","opacity":1,"strokeDash":[4,4],"strokeCap":"butt"} Use includePlotMargin to control whether the separators extend into the plot margin.

Default value: false

spacing
Type: number

The gap between the views, in pixels.

templates
Type: object

TODO

title
Type: string | Title

View title.

transform
Type: array

An array of transformations applied to the data before visual encoding.

vconcat Required
Type: array

TODO

viewportHeight
Type: SizeDef | number | ExprRef | "container"

Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as height)

viewportWidth
Type: SizeDef | number | ExprRef | "container"

Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or "container".

Default: null (same as width)

visible
Type: boolean

The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility.

Default: true

width
Type: SizeDef | number | Step | ExprRef | "container"

Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or "container". Check child sizing for details.

Default: "container"

ValueParameter

Type: PlainValueParameter | TransitionedValueParameter

VcfDataFormat

parse
Type: Parse | null

If set to null, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of "number", "boolean", "date", or null (do not parse the field)). For example, "parse": {"modified_on": "date"} parses the modified_on field in each input record a Date value.

For "date", we parse data based using Javascript's Date.parse(). For Specific date formats can be provided (e.g., {foo: "date:'%m%d%Y'"}), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., {foo: "utc:'%m%d%Y'"}). See more about UTC time

ViewBackground

fill
Type: string

Fill color of the view background.

fillOpacity
Type: number

Opacity of the view background fill.

shadowBlur
Type: number | ExprRef

The blur radius of the drop shadow in pixels. Higher values produce a more diffuse shadow.

Default value: 0

shadowColor
Type: string | ExprRef

The color of the drop shadow. Any valid CSS color string is allowed.

Default value: "black"

shadowOffsetX
Type: number | ExprRef

The horizontal offset of the drop shadow in pixels. Positive values move the shadow to the right.

Default value: 0

shadowOffsetY
Type: number | ExprRef

The vertical offset of the drop shadow in pixels. Positive values move the shadow downward.

Default value: 0

shadowOpacity
Type: number | ExprRef

The opacity of the drop shadow. Value between 0 (fully transparent) and 1 (fully opaque).

Default value: 0 (disabled)

stroke
Type: string

Stroke color of the view background.

strokeOpacity
Type: number

Opacity of the view background stroke.

strokeWidth
Type: number

Stroke width of the view background border.

strokeZindex
Type: number

Z-order of the background stroke relative to the view content.

Values greater than 0 render after the view marks. Values less than or equal to 0 render before the marks.

Default value: 0, or 10 when the view content is clipped or scrollable.

style
Type: string | string[]

Named style reference(s) resolved from config.style. If an array is provided, later styles override earlier ones.

Default value: "cell"

zindex
Type: number

Z-order of the background fill relative to the view content.

Values greater than 0 render after the view marks. Values less than or equal to 0 render before the marks.

Default value: 0

ViewOpacityDef

Type: number | DynamicOpacity | ExprRef

ViewSpec

Type: UnitSpec | LayerSpec | MultiscaleSpec | VConcatSpec | HConcatSpec | ConcatSpec

WindowOnlyOp

Type: "row_number" | "rank" | "dense_rank" | "percent_rank" | "cume_dist" | "ntile" | "lag" | "lead" | "first_value" | "last_value" | "nth_value" | "prev_value" | "next_value"

WindowOp

Type: "row_number" | "rank" | "dense_rank" | "percent_rank" | "cume_dist" | "ntile" | "lag" | "lead" | "first_value" | "last_value" | "nth_value" | "prev_value" | "next_value" | "count" | "valid" | "sum" | "min" | "max" | "mean" | "q1" | "median" | "q3" | "variance"