Skip to main content

Crate orbital_charts

Crate orbital_charts 

Source
Expand description

Orbital Charts — chart components and engine.

Re-exports§

pub use preview::DatasetIntegration;
pub use preview::DATASETINTEGRATION_PREVIEW_REGISTRATION;

Modules§

pointer
Pointer tracking over the plot area.
preview
Preview registration for gap stubs.
tooltip
Tooltip data hooks built from chart and interaction context.

Structs§

ArcSweepSliceProps
Props for the ArcSweepSlice component.
AreaChartPreviewProps
Props for the AreaChartPreview component.
AreaChartProps
Props for the AreaChart component.
AreaFillProps
Props for the AreaFill component.
AreaPlotProps
Props for the AreaPlot component.
AxisClickData
Data emitted when an axis is clicked.
AxisClickLayerProps
Props for the AxisClickLayer component.
AxisDef
Definition of one chart axis.
AxisHighlightConfig
Crosshair and band highlight configuration.
AxisTooltipData
Data for an axis-triggered tooltip.
AxisTooltipRow
One row in an axis-triggered tooltip.
BandScale
Band scale mapping categorical domain to a numeric range.
BarChartPreviewProps
Props for the BarChartPreview component.
BarChartProps
Props for the BarChart component.
BarGeometry
Render-ready bar rectangle in plot coordinates.
BarLabelConfig
Configuration for bar-specific labels.
BarMarkProps
Props for the BarMark component.
BarPlotProps
Props for the BarPlot component.
ChartAxisTicks
Precomputed tick values keyed by axis id (separate x/y maps).
ChartCompositionPreviewProps
Props for the ChartCompositionPreview component.
ChartCompositionProps
Props for the ChartComposition component.
ChartContainerPreviewProps
Props for the ChartContainerPreview component.
ChartContainerProps
Props for the ChartContainer component.
ChartContext
Full chart context provided to composition children.
ChartContextProviderProps
Props for the ChartContextProvider component.
ChartDefsProps
Props for the ChartDefs component.
ChartEvents
Chart interaction event callbacks.
ChartFeatures
Opt-in chart capabilities. No license checks — flags are product configuration only.
ChartFieldBinding
Declarative binding from crate::Dataset fields to chart geometry.
ChartInteractionContext
Interaction context for item hover, highlight, legend, and pointer tracking.
ChartInteractionProviderProps
Props for the ChartInteractionProvider component.
ChartItemId
Identifier for a clicked or hovered chart item.
ChartKeyboardFocusProps
Props for the ChartKeyboardFocus component.
ChartLinearGradientProps
Props for the ChartLinearGradient component.
ChartMotion
Chart-level animation configuration. Default: enabled, respects reduced motion.
ChartOverlayContext
Overlay mount and root refs provided by ChartRoot.
ChartPointerLayerProps
Props for the ChartPointerLayer component.
ChartScales
Built scales keyed by axis id.
ChartStackingPreviewProps
Props for the ChartStackingPreview component.
ChartStackingProps
Props for the ChartStacking component.
ChartState
Resolved chart state including built scales.
ChartTooltipContext
Active tooltip trigger configuration stored in context.
ChartZoomContext
Zoom interaction context provided to chart children.
ChartZoomLayerProps
Props for the ChartZoomLayer component.
ChartZoomProviderProps
Props for the ChartZoomProvider component.
ColorScale
Color scale mapping values to colors.
DataRecord
One row of typed values, addressable by field key.
DataSchema
Schema describing the fields in a crate::Dataset.
Dataset
The shared shape. Tables render it; charts build series by field key.
DrawingArea
Computed drawing area inside plot insets.
FieldDef
Shared field descriptor — binding key for table columns and chart series.
FocusableMark
A focusable mark with plot-space center coordinates.
GaugeContextProviderProps
Props for the GaugeContextProvider component.
GaugeGeometry
Gauge arc geometry configuration.
GaugeLayout
Resolved gauge layout in pixel space.
GaugePreviewProps
Props for the GaugePreview component.
GaugeProps
Props for the Gauge component.
GaugeReferenceArcProps
Props for the GaugeReferenceArc component.
GaugeState
Computed gauge geometry exposed to custom overlay children.
GaugeValueArcMotionProps
Props for the GaugeValueArcMotion component.
GridConfig
Background grid line configuration.
HeatmapCell
One heatmap cell: x index, y index, and numeric value (z).
HeatmapCellLayout
Layout for a single rendered heatmap cell.
HeatmapCellMarkProps
Props for the HeatmapCellMark component.
HeatmapPlotContext
Heatmap cell data and color scale provided by [Heatmap].
HeatmapPlotProps
Props for the HeatmapPlot component.
HeatmapPlotProviderProps
Props for the HeatmapPlotProvider component.
HeatmapPreviewProps
Props for the HeatmapPreview component.
HeatmapProps
Props for the Heatmap component.
HighlightScope
Scope controlling highlight and fade behavior.
HitTarget
Hit target returned from pointer lookup.
InlineSeries
One inline data series.
InlineSeriesData
Inline series data for standalone demos.
ItemTooltipData
Data for an item-triggered tooltip row.
LegendConfig
Configuration for the embedded or composed legend.
LegendPosition
Legend placement within the chart shell.
LineChartPreviewProps
Props for the LineChartPreview component.
LineChartProps
Props for the LineChart component.
LinePath
Generated SVG path and marker positions.
LinePlotProps
Props for the LinePlot component.
LineStrokeProps
Props for the LineStroke component.
LinearScale
Linear scale mapping numeric domain to range.
LogScale
Logarithmic (base-10) scale.
OrbitalChartPalette
Theme-driven chart color palette.
OrbitalChartsTheme
Chart-specific theme defaults applied via CSS variables on [data-orbital-chart].
PathDrawMotionProps
Props for the PathDrawMotion component.
PieArcLabelConfig
Configuration for pie arc labels.
PieChartPreviewProps
Props for the PieChartPreview component.
PieChartProps
Props for the PieChart component.
PieGeometry
Pie geometry configuration (radii and center may be px or % strings).
PieLayout
Resolved pie center and radii in plot pixel space.
PiePlotProps
Props for the PiePlot component.
PieSliceData
One slice in a pie series.
PieSliceLayout
Layout for one pie slice including SVG path.
PieSliceProps
Props for the PieSlice component.
PlacedScatterPoint
Pixel-space scatter point for hit testing.
PlotClipProps
Props for the PlotClip component.
PlotInset
Space between the SVG border and the plot area. User docs: “plot inset”.
PlotPoint
A point in plot space; y may be None for missing data.
ProjectedChartData
Result of projecting a dataset through a field binding.
ProjectedHeatmapData
Projected heatmap data ready for layout.
ProjectedPieData
Projected pie data ready for layout.
ProjectedScatterData
Projected scatter data ready for scale mapping.
ProjectedSeries
One projected data series ready for scale mapping.
ReferenceLineProps
Props for the ReferenceLine component.
ReferenceLineStyle
SVG stroke styling for a reference line.
ScatterChartPreviewProps
Props for the ScatterChartPreview component.
ScatterChartProps
Props for the ScatterChart component.
ScatterPlotProps
Props for the ScatterPlot component.
ScatterPoint
One scatter point with required identity.
ScatterPointProps
Props for the ScatterPoint component.
ScatterSeriesData
One scatter series with points and axis bindings.
SeriesDef
Definition of one data series in a chart.
SeriesLabelConfig
Configuration for series data labels.
SparklinePlotProps
Props for the SparklinePlot component.
SparklinePreviewProps
Props for the SparklinePreview component.
SparklineProps
Props for the Sparkline component.
TimeScale
Ordinal time scale mapping dates to range positions by index.
TooltipConfig
Configuration for chart tooltips.
TooltipContentSlots
Custom tooltip content slots.
VoronoiLayerProps
Props for the VoronoiLayer component.
ZoomConfig
Zoom and pan configuration for an axis (CH-24).
ZoomDragState
Active drag state for pan gesture.
ZoomWindow
Percent window (0–100) over an axis’s full domain.

Enums§

ArcLabelMode
Arc label content mode.
AxisHighlightMode
Axis highlight rendering mode.
AxisPosition
Position of an axis relative to the plot area.
ChartCompositionOrder
Documented child order for chart composition — no runtime enforcement.
ChartCompositionVariant
Composition preview variants.
ChartDataSource
How chart data is supplied to the container.
ChartEmbedMode
How a chart is embedded in its host layout.
ChartKind
Chart geometry family driving projection and scale construction.
ChartOrientation
Chart layout orientation.
ChartScale
Scale handle returned by use_x_scale and use_y_scale.
ChartStackingVariant
Stacking preview variants.
ChartType
Supported chart geometry families.
ColorScaleKind
Kind of color scale applied to an axis or series.
CurveType
Line and area curve interpolation.
DataValue
Typed cell value — replaces stringly-typed HashMap<String, String>.
DomainLimit
Domain limit strategy for value axes.
FadeMode
Fade mode for non-highlighted items.
GaugeLabel
Center label content: static string or formatter callback.
HighlightMode
Highlight mode for hovered or selected items.
LabelLocation
Surface where a chart label is rendered.
LegendDirection
Legend item flow direction.
LegendHorizontalAlign
Horizontal alignment of the legend within the chart shell.
LegendVerticalAlign
Vertical alignment of the legend within the chart shell.
OverlayMount
Portal mount override for chart overlay chrome.
PieRadius
Radius or center offset expressed as pixels or percentage of plot dimension.
ProjectionError
Errors raised when extracting or projecting chart columns from a crate::Dataset.
ReferenceLineLabelAlign
Label placement along a reference line.
ScaleType
Scale type for an axis.
SparklinePlotType
Line or bar rendering for a sparkline.
StackOffset
Stacking offset strategy for grouped series.
StackOrder
Stacking order for grouped series.
TickLabelPlacement
Tick label placement for band scales.
TickPlacement
Tick placement for band scales.
TooltipTrigger
Tooltip activation trigger mode.
ZoomFilterMode
How off-range data is treated when zooming.

Constants§

CHART_FEATURES_DEFAULT
Default capability flags for chart containers (ANIMATION + KEYBOARD_NAV).
DEFAULT_TICK_COUNT
Approximate number of ticks for a linear value axis.
HEATMAP_CANVAS_THRESHOLD
Threshold above which canvas rendering is preferred (internal optimization).
HEATMAP_CELL_GAP_RATIO
Default gap ratio between heatmap cells (visual 2px gap via inset).
HEATMAP_ITEM_SERIES_ID
Synthetic series id used for heatmap cell hover and tooltips.

Statics§

AREACHART_PREVIEW_REGISTRATION
BARCHART_PREVIEW_REGISTRATION
CHARTCOMPOSITION_PREVIEW_REGISTRATION
CHARTCONTAINER_PREVIEW_REGISTRATION
CHARTSAXIS_PREVIEW_REGISTRATION
CHARTSTACKING_PREVIEW_REGISTRATION
GAUGE_PREVIEW_REGISTRATION
HEATMAP_PREVIEW_REGISTRATION
LINECHART_PREVIEW_REGISTRATION
PIECHART_PREVIEW_REGISTRATION
SCATTERCHART_PREVIEW_REGISTRATION
SPARKLINE_PREVIEW_REGISTRATION

Functions§

ArcSweepSlice
Animated pie slice path with sweep entrance.
AreaChart
Show volume or composition under a trend line with filled regions.
AreaChartPreview
AreaFill
Filled area path under a line.
AreaPlot
Renders filled area paths for each series.
AxisClickLayer
Transparent band rects for category axis click handling.
AxisHighlight
Renders axis-aligned crosshair or category band highlight.
BarChart
Compare discrete categories by magnitude with one or more numeric series.
BarChartPreview
BarMark
One grouped bar rectangle in plot space.
BarPlot
Renders grouped or stacked bar marks inside the plot area.
ChartComposition
Wrap your data definitions in a chart container, then stack plot, axis, and interaction components as children.
ChartCompositionPreview
ChartContainer
Ready-made chart layout root — bind a Dataset, tune props, or compose plot children.
ChartContainerPreview
ChartContextProvider
Provide chart context and scales to child components.
ChartCustomBaseline
Dashed baseline drawn via use_drawing_area and use_y_scale.
ChartDefs
SVG defs container for gradients and patterns.
ChartGrid
Renders background grid lines inside the plot area (relative coordinates).
ChartInteractionProvider
Provide interaction context to descendants.
ChartKeyboardFocus
Renders a focus ring at the keyboard- or pointer-active mark position.
ChartLinearGradient
Register a linear gradient in chart SVG defs.
ChartOverlayLayer
Scoped portal mount inside [data-orbital-chart] for interactive overlay chrome.
ChartPointerLayer
Transparent overlay capturing pointer events for axis tooltips and crosshair.
ChartRoot
Internal chart root layout shell.
ChartRootOverlayChrome
Loading and legend layers mounted above the SVG viewport.
ChartStacking
Stack series when each category total is meaningful and segments show contribution.
ChartStackingPreview
ChartTooltip
Floating tooltip panel for item or axis hover modes.
ChartTooltipAxisContent
Default axis tooltip body.
ChartTooltipItemContent
Default item tooltip body.
ChartZoomLayer
Transparent overlay capturing wheel, drag, and pinch zoom gestures.
ChartZoomProvider
Provide zoom context to descendants.
ChartsAxis
Axes translate your data values into positions on the chart — scale type, domain, ticks, and labels are all configured per axis.
ContinuousColorLegend
Gradient bar legend for a continuous or piecewise color scale.
Gauge
Arc gauge for single-metric readouts with meter accessibility.
GaugeContainer
Gauge SVG shell with meter accessibility and layout context.
GaugeContextProvider
Provide gauge state to child components.
GaugePreview
GaugeReferenceArc
Static reference (track) arc showing full range.
GaugeValueArcMotion
Animated gauge value arc with sweep tween.
Heatmap
Two-dimensional categorical heatmap with z-axis color scale.
HeatmapCellMark
One heatmap cell rectangle.
HeatmapPlot
Renders heatmap cells as SVG rects (canvas for dense grids on hydrate).
HeatmapPlotProvider
Provide heatmap plot data to child layers.
HeatmapPreview
Legend
Chart legend listing series with color swatches and optional visibility toggles.
LineChart
Show change over a continuous dimension — time, index, or ordered categories.
LineChartPreview
LinePlot
Renders line strokes and optional markers for each series.
LineStroke
Line path with optional draw animation and markers.
PathDrawMotion
Animated SVG stroke path with dash-offset draw on enter.
PieChart
Show proportions of a single total when slice share matters more than precise comparison.
PieChartPreview
PiePlot
Renders pie slices inside the plot area.
PieSlice
One pie slice with optional arc label.
PlotClip
Defines a plot-area clip path and wraps children in a clipped <g>.
ReferenceLine
Horizontal or vertical reference guide line with optional label.
ResponsiveChartContainer
Chart container that fills its parent via resize observer.
ScatterChart
Compare two numeric dimensions point by point — correlations, outliers, or multi-group distributions.
ScatterChartPreview
ScatterPlot
Renders scatter points inside the plot area.
ScatterPoint
One scatter point circle.
Sparkline
Compact inline trend chart without visible axis chrome.
SparklinePlot
Renders sparkline line or bar marks without axis chrome.
SparklinePreview
VoronoiLayer
Transparent overlay for nearest-point hover and click hit testing.
XAxis
Renders the x-axis ticks and labels for one axis id.
YAxis
Renders the y-axis ticks and labels for one axis id.
apply_band_zoom_to_axis
Apply band zoom by slicing categories on the axis definition.
apply_chart_keyboard_key
Handle arrow / home / end keyboard navigation from a key string.
apply_stack_order
Reorder series indices within a stack group.
arc_label_position
Arc label position at mid-angle on the given radius.
arc_path_d
Generate SVG arc path for a donut/pie wedge.
arc_path_d_sweep
Partial arc path for sweep animation (fraction 0..1 of slice span).
arc_sweep_motion
Default arc sweep motion tokens.
area_gradient_id
Gradient definition id for a series.
axis_categories
Resolve category labels for a band/point axis.
axis_supports_zoom
Whether axis scale type supports percent-window zoom.
axis_zoom_active
Whether zoom is active for an axis given feature flags and axis config.
band_index_to_fraction
Map band index to fraction of full domain (center of band).
bar_entrance_motion
Default bar pop-in motion preset.
build_area_path
Build a closed area path from a line path down to a baseline y.
build_chart_state
Build chart state from container props.
build_line_path
Build an SVG path through plot points.
category_index_at_x
Map a plot x coordinate to a band-scale category index.
chart_styles
CSS for chart root, axes, grid, and density-mapped sizing.
clamp_zoom_window
Clamp and snap a zoom window per axis zoom config.
collect_focusable_marks
Collect ordered focus targets from the latest plot geometry.
compute_drawing_area
Compute the drawing area from chart dimensions and plot inset.
compute_grouped_bars
Compute grouped bar rectangles for all series and categories.
compute_heatmap_cell_layouts
Compute cell layouts from band scales and color scale.
compute_linear_ticks
Generate evenly spaced tick values for a linear domain.
compute_nice_linear_ticks
Compute “nice” linear ticks using a simple step rounding heuristic.
compute_pie_slice_layouts
Compute slice layouts from slice data and geometry.
compute_slice_angles
Compute start/end angles in degrees for each value slice.
compute_stacked_bars
Compute stacked bar rectangles for series sharing stack groups.
data_fingerprint
Fingerprint for re-triggering path draw animation on data change.
default_continuous_scale
Default continuous color scale for heatmaps.
default_heatmap_colors
Default continuous heatmap color stops (Orbital sequential).
default_plot_inset
Default plot inset for a density tier (pixels).
default_series_color_vars
Default series color CSS custom properties for chart roots.
default_tick_format
Default compact numeric tick label (e.g. 1200 → “1k”).
default_zoom_window
Default full-range window for an axis.
density_modifier_class
Density modifier class for the chart root element.
effective_skip_animation
Resolve whether animations should be skipped.
enabled_zoom_axes
Collect axis ids with active zoom from x and y axis lists.
estimate_text_width
Approximate rendered width of a tick label at the default chart font size.
filter_projected_by_band_window
Filter projected data to visible band indices when filter mode is discard.
find_bar_at_pointer
Find the bar containing a plot-space pointer, if any.
find_nearest_marker
Find nearest line marker point within radius.
find_nearest_point
Find the nearest scatter point within an optional max radius.
handle_chart_keyboard
Handle arrow / home / end keyboard navigation on chart marks.
heatmap_value_domain
Compute z-value domain from cells and optional overrides.
initial_zoom_windows
Build initial zoom windows from props and axis definitions.
is_composition_mode
Whether any series definition declares an explicit chart type (composition mode).
is_series_visible
Returns true when the series is visible (not hidden by legend).
keyboard_nav_enabled
Whether keyboard navigation is active for this chart.
legend_outside_reserve_style
Inline padding on the chart shell so an outside legend is not clipped.
legend_padding_style
Inline offset style applying LegendConfig::padding on the outer edge.
legend_position_class
CSS class for legend placement within the chart shell.
nice_domain
Expand a value range with padding; handles flat domains.
pan_window
Pan the zoom window by a delta in percent of full domain.
parse_gauge_radius
Parse a radius string into PieRadius.
placeholder_label
Label text for gap placeholder stubs.
project_chart_data
Project a Dataset into chart-ready series using a ChartFieldBinding.
project_pie_data
Project a Dataset into pie slice data.
project_pie_inline
Build pie slices from inline numeric data and category labels.
project_scatter_data
Project a Dataset into scatter series using a field binding.
project_scatter_series
Project scatter from explicit series definitions.
projected_for_plot_type
Filter projected data to series matching a plot type in composition mode.
provide_overlay_context
provide_tooltip_context
Provide tooltip configuration to descendants.
resolve_arc_label_radius
Resolve arc label radius from config or default midpoint.
resolve_bar_color
Resolve color for a bar geometry entry.
resolve_chart_stack_offset
Resolve the dominant stack offset across all groups in a chart.
resolve_color
Resolve a numeric value to a CSS color via a color scale.
resolve_gauge_layout
Resolve gauge geometry to pixel layout.
resolve_linear_axis_domain
Resolve a linear axis domain honoring explicit min/max overrides.
resolve_mark_color
Resolve fill/stroke color for a cartesian series mark.
resolve_pie_geometry
Resolve pie geometry from config and plot dimensions.
resolve_plot_inset
Expand plot insets so axis tick labels and titles fit inside the SVG.
resolve_scatter_domains
Compute per-axis domains for scatter charts.
resolve_series_color
Resolve the stroke/fill color for a series.
resolve_series_label
Resolve display label for a series at a given surface.
resolve_slice_label
Resolve display label for a pie slice at a given surface.
resolve_stack_config
Resolve offset and order for a stack group from member series definitions.
resolve_y_domain
Y-axis domain for scale construction, accounting for stacked and area baselines.
scatter_entrance_motion
Default scatter point fade-scale entrance preset.
series_color_token
CSS token for a series index (1-based in CSS vars).
series_value_range
Min/max across all projected series values.
set_highlighted_item
Set highlighted item and notify listeners.
set_hovered_item
Set the hovered item (or clear with None).
should_filter_projected
Whether any zoomed axis on the primary category axis uses discard filtering.
slice_categories
Slice categories for a band/point axis zoom window.
sparkline_series_from_data
Build inline sparkline series and x categories from numeric data.
stack_groups_from_series
Stack group map from series definitions.
stack_segment_bottom
Bottom of a stacked segment at a row (cumulative of prior series in group).
stack_segment_bottom_for_series
Convenience wrapper using stack config resolved from series definitions.
stack_series
Stack series values within shared stack groups.
toggle_series_visibility
Toggle visibility for a series id in the legend.
use_axis_data_index
Category index under pointer for axis interactions.
use_axis_tooltip
Axis tooltip data derived from pointer band index.
use_chart_context
Access the full chart context.
use_chart_state
Build chart state reactively inside a component.
use_chart_zoom
Access zoom context when present.
use_drawing_area
Access the plot drawing area bounds.
use_gauge_state
Read gauge layout from context inside [Gauge] children.
use_heatmap_plot_context
Read heatmap cell data from context inside the plot layer.
use_hidden_series
Access hidden series ids.
use_highlighted_item
Access the highlighted item signal.
use_hovered_item
Access the hovered item signal.
use_item_tooltip
Item tooltip data derived from hover state.
use_overlay_context
use_pointer_plot
Pointer position in plot coordinates.
use_pointer_tracker
Read-only pointer position in chart shell coordinates.
use_x_scale
Access an x-axis scale by id (defaults to "x").
use_x_ticks
X-axis tick values for an axis id.
use_y_scale
Access a y-axis scale by id (defaults to "y").
use_y_ticks
Y-axis tick values for an axis id.
value_fraction
Map value to 0..1 fraction within min/max.
window_for_axis
Resolve zoom window for an axis id, defaulting to full range.
y_axis_ticks
Linear tick values for a y-axis scale domain.
zoom_at_pointer
Zoom in/out centered on a pointer position within the full domain (0–1 fraction).
zoom_window_to_band_indices
Map a percent window to inclusive-exclusive band index range.
zoom_window_to_linear_domain
Map percent window to linear domain subset.