Expand description
Shared typed dataset primitives for Orbital tables and charts.
This crate provides Dataset, DataRecord, and DataValue — the
canonical data model shared by orbital-datatable and orbital-charts.
Because it has no UI or framework dependencies, any crate in the workspace
can depend on it without introducing cycles.
§Example
use std::collections::HashMap;
use orbital_data::{DataRecord, DataSchema, DataValue, Dataset, FieldDef};
let schema = DataSchema::new(vec![
FieldDef::text("name", "Name"),
FieldDef::text("role", "Role"),
]);
let record = DataRecord::new(
"1",
HashMap::from([
("name".into(), DataValue::Text("Ada".into())),
("role".into(), DataValue::Text("Admin".into())),
]),
);
let dataset = Dataset::from_records(schema, vec![record]);
assert_eq!(dataset.records.len(), 1);Structs§
- Chart
Field Binding - Declarative binding from
crate::Datasetfields to chart geometry. - Data
Record - One row of typed values, addressable by field key.
- Data
Schema - Schema describing the fields in a
crate::Dataset. - Dataset
- The shared shape. Tables render it; charts build series by field key.
- Field
Def - Shared field descriptor — binding key for table columns and chart series.
Enums§
- Compare
Hint - Column type hint for typed comparison (mirrors data table
ColumnTypewithout coupling). - Data
Type - Column/field data type descriptor.
- Data
Value - Typed cell value — replaces stringly-typed
HashMap<String, String>. - Projection
Error - Errors raised when extracting or projecting chart columns from a
crate::Dataset.
Functions§
- text_
map_ from_ strings - Convert a string map into typed text values.