PlotSpec
PlotSpec =
object
Defined in: spec/plot.ts:34
One layer of marks over one frame.
Deliberately free of geometry: no width, height, margin, pixel, cell, font or colour literal appears anywhere in this type. The spec states intent; the renderer owns every measurement. Anything expressed in output units would make the spec renderable by exactly one adapter.
Properties
Section titled “Properties”annotations?
Section titled “annotations?”
optionalannotations?: readonlyAnnotationSpec[]
Defined in: spec/plot.ts:42
aspectRatio?
Section titled “aspectRatio?”
optionalaspectRatio?:number
Defined in: spec/plot.ts:53
Preferred width-to-height ratio. A hint, never a size.
coord?
Section titled “coord?”
optionalcoord?:CoordSpec
Defined in: spec/plot.ts:38
Default { kind: "cartesian" }.
description?
Section titled “description?”
optionaldescription?:string
Defined in: spec/plot.ts:51
Prose describing what the chart shows.
Alt text for SVG and HTML, a screen-reader string, and the sentence a renderer emits when it declines the chart entirely — which is what makes declining acceptable rather than silent.
encoding
Section titled “encoding”encoding:
Partial<Record<Channel,EncodingSpec>>
Defined in: spec/plot.ts:36
fallback?
Section titled “fallback?”
optionalfallback?: readonlyPlotSpec[]
Defined in: spec/plot.ts:61
Specs to try, in order, when a renderer cannot draw this one.
A pie falls back to a normalized stacked bar, a scatter to a binned heatmap. When the list is exhausted the universal fallback applies: render the underlying frame as a table.
interpolate?
Section titled “interpolate?”
optionalinterpolate?:Interpolation
Defined in: spec/plot.ts:41
mark:
Mark
Defined in: spec/plot.ts:35
title?
Section titled “title?”
optionaltitle?:string
Defined in: spec/plot.ts:43
transform?
Section titled “transform?”
optionaltransform?: readonlyTransformSpec[]
Defined in: spec/plot.ts:40
Applied in order, before the encoding is resolved.