Skip to content

About

Concrete immutable record implementations of the rich relational chart model for the Pure ecosystem — carries both FK IDs and resolved navigations.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Pure.Chart.RichRelationalModel

Concrete immutable record implementations of the rich relational chart model for the Pure ecosystem.

Build & test NuGet License: MIT

Overview

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.

Types

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.

Design Principles

  • Immutable — all properties are init-only; records enforce value equality.
  • Composable — each type implements the interface hierarchy from Pure.Chart.RichRelationalModel.Abstractions, which itself composes IChart* and IChartRelationalModel* interfaces.
  • AOT-compatible — the library is trimming- and AOT-safe (IsAotCompatible = true).

Dependencies

Target Frameworks

  • .NET 7
  • .NET 8
  • .NET 9
  • .NET 10

Installation

dotnet add package Pure.Chart.RichRelationalModel

Usage

using 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);

About

Concrete immutable record implementations of the rich relational chart model for the Pure ecosystem — carries both FK IDs and resolved navigations.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from kudima03/Pure.Template