Concrete immutable record implementations of the rich relational chart model for the Pure ecosystem.
Pure.Chart.RichRelationalModel provides sealed record implementations for chart domain entities that combine both the structural (model) and relational aspects of a chart into a single strongly-typed, immutable object. Each record implements a corresponding interface from Pure.Chart.RichRelationalModel.Abstractions and exposes primitive-typed properties via the Pure.Primitives.Abstractions contracts (IGuid, IString).
A "rich relational" model is one that carries not only foreign-key identifiers but also the fully resolved navigation objects — e.g. a ChartRichRelationalModel holds both TypeId (IGuid) and Type (IChartType), both XAxisId/YAxisId and the resolved IAxis instances.
All types live in the Pure.Chart.RichRelationalModel namespace.
| Type | Implements | Properties |
|---|---|---|
ChartRichRelationalModel |
IChartRichRelationalModel |
Id, Title, Description, TypeId, Type, XAxisId, XAxis, YAxisId, YAxis, Series |
AxisRichRelationalModel |
IAxisRichRelationalModel |
Id, Legend |
ChartSeriesRichRelationalModel |
IChartSeriesRichRelationalModel |
Id, ChartId, Legend, XAxisSource, YAxisSource |
ChartTypeRichRelationalModel |
IChartTypeRichRelationalModel |
Id, Name |
Each record provides two constructors:
- Copy constructor — accepts the corresponding rich relational interface, copies all properties.
- Full constructor — accepts each property individually for explicit construction.
- Immutable — all properties are init-only; records enforce value equality.
- Composable — each type implements the interface hierarchy from
Pure.Chart.RichRelationalModel.Abstractions, which itself composesIChart*andIChartRelationalModel*interfaces. - AOT-compatible — the library is trimming- and AOT-safe (
IsAotCompatible = true).
Pure.Chart.RichRelationalModel.Abstractions— interface contracts forIChartRichRelationalModel,IAxisRichRelationalModel,IChartSeriesRichRelationalModel, andIChartTypeRichRelationalModel
- .NET 7
- .NET 8
- .NET 9
- .NET 10
dotnet add package Pure.Chart.RichRelationalModelusing Pure.Chart.RichRelationalModel;
// Construct from individual primitives
IChartRichRelationalModel chart = new ChartRichRelationalModel(
id: myGuid,
title: myTitle,
description: myDescription,
typeId: typeGuid,
type: new ChartTypeRichRelationalModel(typeGuid, typeName),
xAxisId: xGuid,
xAxis: new AxisRichRelationalModel(xGuid, xLegend),
yAxisId: yGuid,
yAxis: new AxisRichRelationalModel(yGuid, yLegend),
series: chartSeriesCollection
);
// Or copy-construct from any IChartRichRelationalModel
IChartRichRelationalModel copy = new ChartRichRelationalModel(existingChart);