Api Reference

/

Public Types

Public Types

The supported root surface is available from import xy. Most users construct lowercase factory results and only name these types in annotations.

Declarative Types

TypeRole
ComponentBase type for declarative child specifications
MarkData geometry specification returned by mark factories
AnnotationRule, band, label, marker, arrow, threshold, or callout
AxisX or y scale and tick specification
LegendLegend chrome or opaque framework replacement
TooltipTooltip chrome or opaque framework replacement
ColorbarInferred continuous-scale chrome or opaque framework replacement
ModebarToolbar visibility and DOM styling
ThemeValidated chart theme tokens
InteractionBrowser interaction and linked-viewport configuration
AnimationBrowser entrance/update policy and lifecycle callbacks
SpringSerializable spring easing policy used by animation()
ChartPublic composed chart with display, export, and readout methods
FacetChartPublic small-multiple wrapper

Directly constructing node dataclasses is supported for inspection and typing, but the lowercase factories perform the intended validation and normalization.

Output and Interaction Types

TypeRole
SelectionCanonical selected indices grouped by trace, plus index and xy() helpers
EngineStatic-image engine choice: auto, default, or chromium

Engine.auto is the default for to_image() and write_image(): it selects XY's native, browser-free renderer unless custom_css requires a browser CSS engine. Engine.default explicitly selects the native renderer, while Engine.chromium selects browser-fidelity export. Use enum members rather than temporary historical string values.

Canonical Column Types

TypeRole
ColumnCanonical contiguous f64 values, kind, copy accounting, and zone maps
ColumnStorePer-figure canonical column owner with identity deduplication
ZoneMapsChunk statistics used by range and aggregation work

These types are public for advanced inspection. They are not a separate high-level data-frame API, and their internals may evolve during alpha.

Public Constants

  • CHART_DOM_SLOTS is the tuple of accepted browser chrome slot names.
  • __version__ reports the installed package version.

The old fluent Figure class is not root-exported. Chart.figure() returns an internal engine object as an advanced escape hatch; do not import xy._figure.Figure as an application API.

XY ships a package-wide py.typed marker. The authoritative runtime inventory is xy.__all__, and Marks and components contains generated callable signatures.

Built with Reflex