genome_spy.FacetSpec¶
- class genome_spy.FacetSpec(axes=Undefined, baseUrl=Undefined, columns=Undefined, config=Undefined, cursor=Undefined, data=Undefined, datasets=Undefined, description=Undefined, domainInert=Undefined, encoding=Undefined, facet=Undefined, height=Undefined, legends=Undefined, name=Undefined, overhang=Undefined, padding=Undefined, params=Undefined, resolve=Undefined, scales=Undefined, spacing=Undefined, spec=Undefined, templates=Undefined, title=Undefined, transform=Undefined, viewportHeight=Undefined, viewportWidth=Undefined, visible=Undefined, width=Undefined, zindex=Undefined, **kwds)View on GitHub¶
Bases:
GenomeSpySchemaGenerated wrapper for
FacetSpec.Methods
axes([value, x, y])Return a copy with
axesupdated.baseUrl(value)Return a copy with
baseUrlupdated.columns(value)Return a copy with
columnsupdated.config([value, arrow, axis, axisBottom, ...])Return a copy with a
GenomeSpyConfigconfig.copy(*[, deep])Return a copy with optional keyword updates.
cursor([value, expr])Return a copy with a
ExprRefcursor.data([value, description, ...])Return a copy with
dataupdated.datasets(value)Return a copy with
datasetsupdated.description(value)Return a copy with
descriptionupdated.domainInert(value)Return a copy with
domainInertupdated.encoding([value, angle, color, direction, ...])Return a copy with a
Encodingencoding.facet([value, column, row])Return a copy with a
FacetMappingfacet.height([value, grow, maxPx, minPx, px])Return a copy with a
SizeDefheight.legends([value, angle, color, dx, dy, fill, ...])Return a copy with
legendsupdated.name(value)Return a copy with
nameupdated.overhang([value, bottom, left, right, top])Return a copy with a
OverhangConfigoverhang.padding([value, bottom, left, right, top])Return a copy with
paddingupdated.params(value)Return a copy with
paramsupdated.resolve([value, axis, legend, scale])Return a copy with
resolveupdated.Return this class schema with referenced properties merged in.
scales([value, angle, color, direction, dx, ...])Return a copy with
scalesupdated.spacing([value, column, row])Return a copy with a
FacetSpacingspacing.spec([value, axes, baseUrl, config, cursor, ...])Return a copy with a
LayerSpecspec.templates(value)Return a copy with
templatesupdated.title([value, align, anchor, angle, ...])Return a copy with a
Titletitle.to_dict(*[, validate])Serialize this schema wrapper to a JSON-compatible dictionary.
to_json(*[, validate])Serialize this schema wrapper to formatted JSON.
transform(value)Return a copy with
transformupdated.validate(instance)Validate an instance against this wrapper's schema.
viewportHeight([value, anchor, expr, grow, ...])Return a copy with a
ViewportSizeDefviewportHeight.viewportWidth([value, anchor, expr, grow, ...])Return a copy with a
ViewportSizeDefviewportWidth.visible(value)Return a copy with
visibleupdated.width([value, grow, maxPx, minPx, px])Return a copy with a
SizeDefwidth.zindex(value)Return a copy with
zindexupdated.- axes(value=Undefined, /, *, x=Undefined, y=Undefined)View on GitHub¶
Return a copy with
axesupdated.
- baseUrl(value)View on GitHub¶
Return a copy with
baseUrlupdated.
- columns(value)View on GitHub¶
Return a copy with
columnsupdated.
- config(value=Undefined, /, *, arrow=Undefined, axis=Undefined, axisBottom=Undefined, axisIndex=Undefined, axisLeft=Undefined, axisLocus=Undefined, axisNominal=Undefined, axisOrdinal=Undefined, axisQuantitative=Undefined, axisRight=Undefined, axisTop=Undefined, axisX=Undefined, axisY=Undefined, header=Undefined, headerColumn=Undefined, headerRow=Undefined, legend=Undefined, legendTrack=Undefined, link=Undefined, mark=Undefined, point=Undefined, range=Undefined, rect=Undefined, rule=Undefined, scale=Undefined, style=Undefined, text=Undefined, tick=Undefined, title=Undefined, view=Undefined)View on GitHub¶
Return a copy with a
GenomeSpyConfigconfig.- Parameters:
arrow (ArrowConfig | dict[str, Any]) – Defaults for arrow marks.
axis (AxisConfig | AxisConfigKwds) – Defaults shared by all axes.
axisBottom (AxisConfig | AxisConfigKwds) – Defaults for bottom-oriented axes.
axisIndex (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize GenomeSpy
indexscales.axisLeft (AxisConfig | AxisConfigKwds) – Defaults for left-oriented axes.
axisLocus (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize GenomeSpy
locusscales.axisNominal (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize nominal data.
axisOrdinal (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize ordinal data.
axisQuantitative (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize quantitative data.
axisRight (AxisConfig | AxisConfigKwds) – Defaults for right-oriented axes.
axisTop (AxisConfig | AxisConfigKwds) – Defaults for top-oriented axes.
axisX (AxisConfig | AxisConfigKwds) – Defaults for x axes.
axisY (AxisConfig | AxisConfigKwds) – Defaults for y axes.
header (FacetHeader | dict[str, Any]) – Defaults for facet category labels, using view-title property names.
headerColumn (FacetHeader | dict[str, Any]) – Defaults for column facet labels, overriding general header defaults.
headerRow (FacetHeader | dict[str, Any]) – Defaults for row facet labels, overriding general header defaults.
legend (LegendConfig | LegendConfigKwds) – Defaults shared by all legends. Set
disabletotrueto suppress automatic legend creation by default.legendTrack (LegendConfig | LegendConfigKwds) – Defaults for legends of track-like views that use
indexorlocusscales on the x channel. __Default value:__{ "style": "track-bottom-legend" }link (LinkConfig | LinkConfigKwds) – Defaults for link marks.
mark (MarkConfig | MarkConfigKwds) – Defaults shared by all mark types.
point (PointConfig | PointConfigKwds) – Defaults for point marks.
range (RangeConfig | RangeConfigKwds) – Named reusable ranges for channels such as
shape,size, and color.rect (RectConfig | RectConfigKwds) – Defaults for rect marks.
rule (RuleConfig | RuleConfigKwds) – Defaults for rule marks.
scale (ScaleConfig | ScaleConfigKwds) – Defaults for scale behavior and scale-type-specific buckets.
style (dict[str, Any]) – Named reusable style buckets that marks, axes, legends, titles, and views can reference through their
styleproperties.text (TextConfig | TextConfigKwds) – Defaults for text marks.
tick (TickConfig | dict[str, Any]) – Defaults for tick marks.
title (TitleConfig | TitleConfigKwds) – Defaults for view titles.
view (ViewConfig | ViewConfigKwds) – Defaults for view background styling, including fill, stroke, shadow, and z-order properties.
- cursor(value=Undefined, /, *, expr=Undefined)View on GitHub¶
Return a copy with a
ExprRefcursor.- Parameters:
expr (str) – The expression string.
- data(value=Undefined, /, *, description=Undefined, dynamicCallbackSource=Undefined, format=Undefined, lazy=Undefined, name=Undefined, sequence=Undefined, url=Undefined, values=Undefined)View on GitHub¶
Return a copy with
dataupdated.- Parameters:
description (str) – Schema-defined
descriptionproperty.dynamicCallbackSource (bool) – The View class has
getDynamicData()methods that provides the data. This is intended for internal use.format (CsvDataFormat | dict[str, Any] | DsvDataFormat | JsonDataFormat | BedDataFormat | BedpeDataFormat | WigDataFormat | VcfDataFormat | OtherDataFormat) – Schema-defined
formatproperty.lazy (LazyDataParams | dict[str, Any]) – Schema-defined
lazyproperty.name (str) – Schema-defined
nameproperty.sequence (SequenceParams | dict[str, Any]) – Generate a sequence of numbers.
url (str | Sequence[str] | ExprRef | dict[str, Any] | UrlList | UrlTemplate) – An URL, a list of URLs, or a URL expansion definition from which to load the data set. A URL template can expand values from an ExprRef and attach the expanded value as a field to loaded rows. Gzip-compressed resources are decompressed transparently when the URL, MIME type, or payload indicates gzip content. Use the
format.typeproperty to ensure the loaded data is correctly parsed.values (InlineDataset | dict[str, Any]) – The full data set, included inline. This can be an array of objects or primitive values, an object, or a string. Arrays of primitive values are ingested as objects with a
dataproperty. Strings are parsed according to the specified format type.
- datasets(value)View on GitHub¶
Return a copy with
datasetsupdated.
- description(value)View on GitHub¶
Return a copy with
descriptionupdated.
- domainInert(value)View on GitHub¶
Return a copy with
domainInertupdated.
- encoding(value=Undefined, /, *, angle=Undefined, color=Undefined, direction=Undefined, dx=Undefined, dy=Undefined, facetIndex=Undefined, fill=Undefined, fillOpacity=Undefined, key=Undefined, opacity=Undefined, order=Undefined, sample=Undefined, search=Undefined, semanticScore=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, text=Undefined, tooltip=Undefined, uniqueId=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined)View on GitHub¶
Return a copy with a
Encodingencoding.- Parameters:
angle (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType) – Rotation angle of point and text marks.
color (FieldOrDatumDefWithConditionMarkPropFieldDefTypeStringNull | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefStringNull | MarkPropExprDefType | ValueDefWithConditionStringNullType) – Color of the marks – either fill or stroke color based on the
filledproperty of mark definition. Note: 1) For fine-grained control over both fill and stroke colors of the marks, please use thefillandstrokechannels. Thefillorstrokeencodings have higher precedence thancolor, thus may override thecolorencoding if conflicting encodings are specified. 2) See the GenomeSpy scale documentation for more information about customizing color schemes.direction (DirectionDef | dict[str, Any]) – Direction of arrow marks. Encoded values are mapped with a discrete scale whose range values must be
"forward","reverse", or"both". The automatic range contains only"forward"and"reverse"; use an explicit value or range to select"both". This channel is supported by arrow marks only and does not create a legend.dx (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType | MarkPropExprDef) – Legacy horizontal pixel offset for point marks.
dy (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType | MarkPropExprDef) – Legacy vertical pixel offset for point marks. Positive values move in the opposite direction from
yOffset.facetIndex (FieldDefWithoutScale | dict[str, Any]) – For internal use
fill (FieldOrDatumDefWithConditionMarkPropFieldDefTypeStringNull | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefStringNull | MarkPropExprDefType | ValueDefWithConditionStringNullType) – Fill color of the marks. Note: The
fillencoding has higher precedence thancolor, thus may override thecolorencoding if conflicting encodings are specified.fillOpacity (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType) – Fill opacity of the marks.
key (FieldDefWithoutScale | dict[str, Any] | Sequence[FieldDefWithoutScale | dict[str, Any]]) – One or more data fields that uniquely identify rows for stable point selections and bookmarking across sessions. Unlike
uniqueId(an implicit surrogate key), key fields must be stable in the source data. Use a single field definition for simple keys, or an array of field definitions for composite keys. For composite keys, field order is significant.opacity (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType) – Opacity of the marks.
order (OrderDef | dict[str, Any]) – Orders instances within this logical mark. The supported form has one selection condition with a finite numeric value and a finite numeric fallback. Lower levels draw first; equal or constant levels are inert.
sample (FieldDefWithoutScale | dict[str, Any]) – Facet identifier for interactive filtering, sorting, and grouping in the App.
search (FieldDefWithoutScale | dict[str, Any] | Sequence[FieldDefWithoutScale | dict[str, Any]]) – One or more fields used by the App’s location/search input to match rows in this view. Use a single field definition for simple search, or an array for matching against multiple fields. A row matches when any configured search field matches the entered term.
semanticScore (dict[str, Any]) – Schema-defined
semanticScoreproperty.shape (FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapeStringNull | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefStringNull | MarkPropExprDefTypeForShape | ValueDefWithConditionStringNullTypeForShape) – Shape of the mark. For
pointmarks the supported values include: - plotting shapes:"circle","square","cross","diamond","triangle-up","triangle-down","triangle-right", or"triangle-left". - stroke-only"x"and"+"shapes, whose line thickness is controlled bystrokeWidth- centered directional shape"triangle"size (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType) – Size of the mark. - For
"point"– the symbol size, or pixel area of the mark. - For"text"– the text’s font size. - For"arrow"– the stem thickness in pixels.stroke (FieldOrDatumDefWithConditionMarkPropFieldDefTypeStringNull | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefStringNull | MarkPropExprDefType | ValueDefWithConditionStringNullType) – Stroke color of the marks. Note: The
strokeencoding has higher precedence thancolor, thus may override thecolorencoding if conflicting encodings are specified.strokeOpacity (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType) – Stroke opacity of the marks.
strokeWidth (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType) – Stroke width of the marks.
text (StringFieldDef | dict[str, Any] | StringDatumDef | ExprDef | ValueDefString) – Text of the
textmark.tooltip (StringFieldDef | dict[str, Any] | StringDatumDef | ExprDef | ValueDefString | Sequence[StringFieldDef | dict[str, Any] | StringDatumDef | ExprDef | ValueDefString] | None) – Fields, expressions, or values shown by the default tooltip handler. If omitted, the default tooltip handler shows the hovered datum’s properties. If
null, the default tooltip handler shows no raw datum rows for this mark. Use an array to show multiple rows in a specific order.uniqueId (FieldDefWithoutScale | dict[str, Any]) – For internal use
x (dict[str, Any] | None) – X coordinates of the marks. The
valueof this channel can be a number between zero and one.x2 (Position2Def | dict[str, Any] | None) – X2 coordinates of the marks. The
valueof this channel can be a number between zero and one.x2Offset (SecondaryOffsetDef | dict[str, Any] | None) – Horizontal displacement of x2, using the xOffset scale for data values.
xOffset (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType | MarkPropExprDef | None) – Horizontal offset from the encoded x position, in logical pixels.
y (PositionFieldDef | dict[str, Any] | ChromPosDef | PositionDatumDef | PositionExprDef | ValueDefNumber | None) – Y coordinates of the marks. The
valueof this channel can be a number between zero and one.y2 (Position2Def | dict[str, Any] | None) – Y2 coordinates of the marks. The
valueof this channel can be a number between zero and one.y2Offset (SecondaryOffsetDef | dict[str, Any] | None) – Vertical displacement of y2, using the yOffset scale for data values.
yOffset (FieldOrDatumDefWithConditionMarkPropFieldDefTypeNumber | dict[str, Any] | FieldOrDatumDefWithConditionScaleDatumDefNumber | MarkPropExprDefType | ValueDefWithConditionNumberType | MarkPropExprDef | None) – Vertical offset from the encoded y position, in logical pixels.
- facet(value=Undefined, /, *, column=Undefined, row=Undefined)View on GitHub¶
Return a copy with a
FacetMappingfacet.- Parameters:
column (FacetFieldDef | dict[str, Any]) – Schema-defined
columnproperty.row (FacetFieldDef | dict[str, Any]) – Schema-defined
rowproperty.
- height(value=Undefined, /, *, grow=Undefined, maxPx=Undefined, minPx=Undefined, px=Undefined)View on GitHub¶
Return a copy with a
SizeDefheight.
- legends(value=Undefined, /, *, angle=Undefined, color=Undefined, dx=Undefined, dy=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, yOffset=Undefined)View on GitHub¶
Return a copy with
legendsupdated.- Parameters:
angle (Legend | LegendKwds) – Schema-defined
angleproperty.color (Legend | LegendKwds) – Schema-defined
colorproperty.dx (Legend | LegendKwds) – Schema-defined
dxproperty.dy (Legend | LegendKwds) – Schema-defined
dyproperty.fill (Legend | LegendKwds) – Schema-defined
fillproperty.fillOpacity (Legend | LegendKwds) – Schema-defined
fillOpacityproperty.opacity (Legend | LegendKwds) – Schema-defined
opacityproperty.shape (Legend | LegendKwds) – Schema-defined
shapeproperty.size (Legend | LegendKwds) – Schema-defined
sizeproperty.stroke (Legend | LegendKwds) – Schema-defined
strokeproperty.strokeOpacity (Legend | LegendKwds) – Schema-defined
strokeOpacityproperty.strokeWidth (Legend | LegendKwds) – Schema-defined
strokeWidthproperty.x2Offset (Legend | LegendKwds) – Schema-defined
x2Offsetproperty.xOffset (Legend | LegendKwds) – Schema-defined
xOffsetproperty.y2Offset (Legend | LegendKwds) – Schema-defined
y2Offsetproperty.yOffset (Legend | LegendKwds) – Schema-defined
yOffsetproperty.
- name(value)View on GitHub¶
Return a copy with
nameupdated.
- overhang(value=Undefined, /, *, bottom=Undefined, left=Undefined, right=Undefined, top=Undefined)View on GitHub¶
Return a copy with a
OverhangConfigoverhang.
- padding(value=Undefined, /, *, bottom=Undefined, left=Undefined, right=Undefined, top=Undefined)View on GitHub¶
Return a copy with
paddingupdated.
- params(value)View on GitHub¶
Return a copy with
paramsupdated.
- resolve(value=Undefined, /, *, axis=Undefined, legend=Undefined, scale=Undefined)View on GitHub¶
Return a copy with
resolveupdated.- Parameters:
axis (ResolutionMapResolutionBehavior | dict[str, Any]) – Schema-defined
axisproperty.legend (ResolutionMapLegendResolutionBehavior | dict[str, Any]) – Schema-defined
legendproperty.scale (ResolutionMapResolutionBehavior | dict[str, Any]) – Schema-defined
scaleproperty.
- scales(value=Undefined, /, *, angle=Undefined, color=Undefined, direction=Undefined, dx=Undefined, dy=Undefined, fill=Undefined, fillOpacity=Undefined, opacity=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, x=Undefined, x2=Undefined, x2Offset=Undefined, xOffset=Undefined, y=Undefined, y2=Undefined, y2Offset=Undefined, yOffset=Undefined)View on GitHub¶
Return a copy with
scalesupdated.- Parameters:
angle (Scale | ScaleKwds) – Schema-defined
angleproperty.color (Scale | ScaleKwds) – Schema-defined
colorproperty.direction (Scale | ScaleKwds) – Schema-defined
directionproperty.dx (Scale | ScaleKwds) – Schema-defined
dxproperty.dy (Scale | ScaleKwds) – Schema-defined
dyproperty.fill (Scale | ScaleKwds) – Schema-defined
fillproperty.fillOpacity (Scale | ScaleKwds) – Schema-defined
fillOpacityproperty.opacity (Scale | ScaleKwds) – Schema-defined
opacityproperty.shape (Scale | ScaleKwds) – Schema-defined
shapeproperty.size (Scale | ScaleKwds) – Schema-defined
sizeproperty.stroke (Scale | ScaleKwds) – Schema-defined
strokeproperty.strokeOpacity (Scale | ScaleKwds) – Schema-defined
strokeOpacityproperty.strokeWidth (Scale | ScaleKwds) – Schema-defined
strokeWidthproperty.x (Scale | ScaleKwds) – Schema-defined
xproperty.x2 (Scale | ScaleKwds) – Schema-defined
x2property.x2Offset (Scale | ScaleKwds) – Schema-defined
x2Offsetproperty.xOffset (Scale | ScaleKwds) – Schema-defined
xOffsetproperty.y (Scale | ScaleKwds) – Schema-defined
yproperty.y2 (Scale | ScaleKwds) – Schema-defined
y2property.y2Offset (Scale | ScaleKwds) – Schema-defined
y2Offsetproperty.yOffset (Scale | ScaleKwds) – Schema-defined
yOffsetproperty.
- spacing(value=Undefined, /, *, column=Undefined, row=Undefined)View on GitHub¶
Return a copy with a
FacetSpacingspacing.
- spec(value=Undefined, /, *, axes=Undefined, baseUrl=Undefined, config=Undefined, cursor=Undefined, data=Undefined, datasets=Undefined, description=Undefined, domainInert=Undefined, encoding=Undefined, height=Undefined, layer=Undefined, legends=Undefined, name=Undefined, opacity=Undefined, overhang=Undefined, padding=Undefined, params=Undefined, resolve=Undefined, scales=Undefined, templates=Undefined, title=Undefined, transform=Undefined, view=Undefined, viewportHeight=Undefined, viewportWidth=Undefined, visible=Undefined, width=Undefined, zindex=Undefined)View on GitHub¶
Return a copy with a
LayerSpecspec.- Parameters:
axes (AxesKwds) – Defines properties for axis resolutions used by this view subtree. When a positional scale is declared at the view level, an axis can be created explicitly by declaring the corresponding channel here. 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 (str) – 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 (GenomeSpyConfig | GenomeSpyConfigKwds) – Configures defaults for this view subtree. Properties in child views override properties inherited from ancestors.
cursor (str | ExprRef | dict[str, Any]) – 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 (UrlData | dict[str, Any] | InlineData | NamedData | DynamicCallbackData | LazyData | SequenceGenerator) – Specifies a data source. If omitted, the data source is inherited from the parent view.
datasets (dict[str, Any]) – 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 (str | Sequence[str]) – 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 (bool) – If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically. Default value:
falseencoding (Encoding | EncodingKwds) – Specifies how data are encoded using the visual channels.
height (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['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 (Sequence[LayerSpec | dict[str, Any] | UnitSpec | MultiscaleSpec | ImportSpec]) – Schema-defined
layerproperty.legends (LegendsKwds) – 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 (str) – 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 (float | DynamicOpacity | DynamicOpacityKwds | ExprRef | dict[str, Any]) – Opacity of the view and all its children. This can be: - a fixed number between
0and1- an expression reference (ExprRef) - aDynamicOpacitydefinition 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.0overhang (OverhangConfig | dict[str, Any]) – 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 (Paddings | PaddingsKwds | float) – 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:0params (Sequence[PlainValueParameter | dict[str, Any] | TransitionedValueParameter | PlainExprParameter | TransitionedExprParameter | DebouncedExprParameter | PositionalIntervalSelectionParameter | GradientIntervalSelectionParameterColor | GradientIntervalSelectionParameterFill | GradientIntervalSelectionParameterStroke | RecordSelectionParameter | CategorySelectionParameterX | CategorySelectionParameterY | CategorySelectionParameterColor | CategorySelectionParameterFill | CategorySelectionParameterStroke | CategorySelectionParameterShape | RulerParameter]) – Dynamic variables that parameterize a visualization.
resolve (ResolveKwds) – 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 (ScalesKwds) – Defines properties for scale resolutions used by this view subtree. A scale declaration does not create an axis; declare the corresponding
axesproperty when an axis is needed without a positional encoding. 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. Expression references in these scale properties use this view’s parameter scope and can access parameters declared here or on ancestors.templates (dict[str, Any]) – Schema-defined
templatesproperty.transform (Sequence[IndexDendrogramParams | dict[str, Any] | SiblingOrderedDendrogramParams | ExplicitlyOrderedDendrogramParams | AlignmentMismatchesParams | AggregateParams | CollectParams | ValuesParams | BranchParams | CoverageParams | CoordinateLookupParams | CrossParams | Displace1DParams | Displace2DParams | FlattenDelimitedParams | FormulaParams | LookupParams | ExprFilterParams | SelectionFilterParams | AxisLabelLayoutParams | FilterScoredLabelsParams | FlattenParams | FlattenCompressedExonsParams | FlattenCigarParams | FlattenSequenceParams | IdentifierParams | LinearizeGenomicCoordinateParams | MeasureTextParams | TruncateTextParams | PackLegendLabelsParams | MergeFacetsParams | PileupParams | ProjectParams | RegexExtractParams | RegexFoldParams | SampleParams | SetIntersectionParams | StackParams | WindowParams]) – An array of transformations applied to the data before visual encoding.
view (ViewBackground | ViewBackgroundKwds) – Schema-defined
viewproperty.viewportHeight (ViewportSizeDef | dict[str, Any] | float | Literal['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 asheight)viewportWidth (ViewportSizeDef | dict[str, Any] | float | Literal['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 aswidth)visible (bool) – The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility. Default:
truewidth (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['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"zindex (float) – Z-order among sibling views in a composition. Higher values render later. Views with equal values render in declaration order. This does not affect layout order. __Default value:__
0
- templates(value)View on GitHub¶
Return a copy with
templatesupdated.
- title(value=Undefined, /, *, align=Undefined, anchor=Undefined, angle=Undefined, baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, frame=Undefined, offset=Undefined, orient=Undefined, reserve=Undefined, style=Undefined, subtitle=Undefined, subtitleColor=Undefined, subtitleFont=Undefined, subtitleFontSize=Undefined, subtitleFontStyle=Undefined, subtitleFontWeight=Undefined, subtitlePadding=Undefined, text=Undefined, zindex=Undefined)View on GitHub¶
Return a copy with a
Titletitle.- Parameters:
align (Align_T) – Horizontal text alignment for title text. One of
"left","center", or"right".anchor (TitleAnchor_T) – The anchor position for placing the title and subtitle text. One of
"start","middle", or"end". For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.angle (float | ExprRef | dict[str, Any]) – Angle in degrees of title and subtitle text.
baseline (Baseline_T) – Vertical text baseline for title and subtitle text. One of
"alphabetic"(default),"top","middle", or"bottom".color (str | ExprRef | dict[str, Any]) – Text color for title text.
dx (float) – Delta offset for title and subtitle text x-coordinate.
dy (float) – Delta offset for title and subtitle text y-coordinate.
font (str) – Font name for title text.
fontSize (float | ExprRef | dict[str, Any]) – Font size in pixels for title text.
fontStyle (FontStyle_T) – Font style for title text.
fontWeight (FontWeight_T) – Font weight for title text. This can be either a string (e.g
"bold","normal") or a number (100,200,300, …,900where"normal"=400and"bold"=700).frame (TitleFrame_T) – The reference frame for the title anchor.
"group"anchors the title along the plot area."bounds"anchors the title along the full bounds, including axes, legends, and other reserved space. __Default value:__"group"offset (float) – The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.
orient (TitleOrient_T) – Default title orientation (
"none","top","bottom","left", or"right")reserve (bool) – Whether the title reserves layout space outside the plot area. Reserved titles are placed outside axes, legends, and other guide space on the same side. Setting this to
falselets the title render without affecting layout, enabling wilder layouts where titles may overlap nearby content. __Default value:__truestyle (str | Sequence[str]) – A mark style property to apply to the title text mark. If not specified, a default style of
"group-title"is applied.subtitle (str | ExprRef | dict[str, Any]) – The subtitle text.
subtitleColor (str | ExprRef | dict[str, Any]) – Text color for subtitle text.
subtitleFont (str) – Font name for subtitle text.
subtitleFontSize (float | ExprRef | dict[str, Any]) – Font size in pixels for subtitle text.
subtitleFontStyle (FontStyle_T) – Font style for subtitle text.
subtitleFontWeight (FontWeight_T) – Font weight for subtitle text. This can be either a string (e.g
"bold","normal") or a number (100,200,300, …,900where"normal"=400and"bold"=700).subtitlePadding (float) – Padding in pixels between title and subtitle text. __Default value:__
3zindex (float) – Z-order of the title relative to the view content. Values greater than
0render after the view marks. Values less than or equal to0render before the marks. __Default value:__1
- transform(value)View on GitHub¶
Return a copy with
transformupdated.
- viewportHeight(value=Undefined, /, *, anchor=Undefined, expr=Undefined, grow=Undefined, maxPx=Undefined, minPx=Undefined, px=Undefined)View on GitHub¶
Return a copy with a
ViewportSizeDefviewportHeight.- Parameters:
anchor (Literal['start', 'end']) – Edge used for initial placement and preserved when content or viewport dimensions change.
"start"means left for width and top for height;"end"means right or bottom. Content smaller than the viewport aligns to that edge too. Manual scrolling changes the pixel distance from it. __Default value:__"start"expr (str) – The expression string.
grow (float) – Share of the remaining space. See child sizing for details.
maxPx (float) – Maximum size in pixels.
minPx (float) – Minimum size in pixels.
px (float) – Size in pixels
- viewportWidth(value=Undefined, /, *, anchor=Undefined, expr=Undefined, grow=Undefined, maxPx=Undefined, minPx=Undefined, px=Undefined)View on GitHub¶
Return a copy with a
ViewportSizeDefviewportWidth.- Parameters:
anchor (Literal['start', 'end']) – Edge used for initial placement and preserved when content or viewport dimensions change.
"start"means left for width and top for height;"end"means right or bottom. Content smaller than the viewport aligns to that edge too. Manual scrolling changes the pixel distance from it. __Default value:__"start"expr (str) – The expression string.
grow (float) – Share of the remaining space. See child sizing for details.
maxPx (float) – Maximum size in pixels.
minPx (float) – Minimum size in pixels.
px (float) – Size in pixels
- visible(value)View on GitHub¶
Return a copy with
visibleupdated.
- width(value=Undefined, /, *, grow=Undefined, maxPx=Undefined, minPx=Undefined, px=Undefined)View on GitHub¶
Return a copy with a
SizeDefwidth.
- zindex(value)View on GitHub¶
Return a copy with
zindexupdated.
- copy(*, deep=True, **kwds)View on GitHub¶
Return a copy with optional keyword updates.
- classmethod resolve_references()View on GitHub¶
Return this class schema with referenced properties merged in.
- to_dict(*, validate=True)View on GitHub¶
Serialize this schema wrapper to a JSON-compatible dictionary.
- to_json(*, validate=True)View on GitHub¶
Serialize this schema wrapper to formatted JSON.
- classmethod validate(instance)View on GitHub¶
Validate an instance against this wrapper’s schema.