# Sparkline

A compact chart over the shared Cartesian compiler, with explicit missing-observation semantics.

 Class  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[Sparkline.cs:42](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Sparkline.cs#L42)

**Implements**

 `IVisualRenderable` 

**Modifiers**

sealed

**Attributes**

 `Fluent` 

A compact chart over the shared Cartesian compiler, with explicit missing-observation semantics.

## Inheritance

- object
- Sparkline

## Usage

 Explore 16 API references to this type 

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 8

- Extension method [Sparkline.Color](/api/chartforgex-core-sparkline/#extension-color-chartforgex-core-sparkline-nullable-chartforgex-primitives-chartcolor)
- Extension method [Sparkline.Smooth](/api/chartforgex-core-sparkline/#extension-smooth-chartforgex-core-sparkline-boolean)
- Extension method [Sparkline.Style](/api/chartforgex-core-sparkline/#extension-style-chartforgex-core-sparkline-chartforgex-core-sparklinestyle)
- Extension method [Sparkline.ValueFormat](/api/chartforgex-core-sparkline/#extension-valueformat-chartforgex-core-sparkline-chartforgex-core-chartvalueformat)
- Method [SparklineFluent.Color](/api/chartforgex-core-sparklinefluent/#method-color-chartforgex-core-sparkline-nullable-chartforgex-primitives-chartcolor)
- Method [SparklineFluent.Smooth](/api/chartforgex-core-sparklinefluent/#method-smooth-chartforgex-core-sparkline-boolean)
- Method [SparklineFluent.Style](/api/chartforgex-core-sparklinefluent/#method-style-chartforgex-core-sparkline-chartforgex-core-sparklinestyle)
- Method [SparklineFluent.ValueFormat](/api/chartforgex-core-sparklinefluent/#method-valueformat-chartforgex-core-sparkline-chartforgex-core-chartvalueformat)

### Accepted by parameters 8

- Extension method [Sparkline.Color](/api/chartforgex-core-sparkline/#extension-color-chartforgex-core-sparkline-nullable-chartforgex-primitives-chartcolor) parameter `sparkline`
- Extension method [Sparkline.Smooth](/api/chartforgex-core-sparkline/#extension-smooth-chartforgex-core-sparkline-boolean) parameter `sparkline`
- Extension method [Sparkline.Style](/api/chartforgex-core-sparkline/#extension-style-chartforgex-core-sparkline-chartforgex-core-sparklinestyle) parameter `sparkline`
- Extension method [Sparkline.ValueFormat](/api/chartforgex-core-sparkline/#extension-valueformat-chartforgex-core-sparkline-chartforgex-core-chartvalueformat) parameter `sparkline`
- Method [SparklineFluent.Color](/api/chartforgex-core-sparklinefluent/#method-color-chartforgex-core-sparkline-nullable-chartforgex-primitives-chartcolor) parameter `sparkline`
- Method [SparklineFluent.Smooth](/api/chartforgex-core-sparklinefluent/#method-smooth-chartforgex-core-sparkline-boolean) parameter `sparkline`
- Method [SparklineFluent.Style](/api/chartforgex-core-sparklinefluent/#method-style-chartforgex-core-sparkline-chartforgex-core-sparklinestyle) parameter `sparkline`
- Method [SparklineFluent.ValueFormat](/api/chartforgex-core-sparklinefluent/#method-valueformat-chartforgex-core-sparkline-chartforgex-core-chartvalueformat) parameter `sparkline`

 Filter members   

    Show inherited   

 

## Constructors

 `public Sparkline(SparklineData data)` [#](#constructor-ctor-chartforgex-core-sparklinedata) 

[Sparkline.cs:42](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Sparkline.cs#L42)

Creates a compact visual from detached sample data.

Parameters

**data ChartForgeX.Core.SparklineData required**

## Methods

 `public PreparedVisual Prepare(VisualRenderContext context)` [#](#method-prepare-chartforgex-rendering-visualrendercontext) 

[Sparkline.cs:46](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Sparkline.cs#L46)

Prepares compact marks through the same compiler and frame contract as a full Cartesian chart.

Parameters

**context ChartForgeX.Rendering.VisualRenderContext required**

Returns

 `PreparedVisual` 

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

## Properties

 `public SparklineData Data { get; }` [#](#property-data) 

[Sparkline.cs:27](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Sparkline.cs#L27)

Gets the immutable samples and resolved bounds.

 `public SparklineStyle Style { get; set; }` [#](#property-style) 

[Sparkline.cs:30](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Sparkline.cs#L30)

Gets or sets the compact mark style.

 `public ChartColor? Color { get; set; }` [#](#property-color) 

[Sparkline.cs:37](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Sparkline.cs#L37)

Gets or sets the optional series colour; null uses the shared theme.

 `public bool Smooth { get; set; }` [#](#property-smooth) 

[Sparkline.cs:39](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Sparkline.cs#L39)

Gets or sets whether line and area segments use the shared curve interpolation.

 `public ChartValueFormat ValueFormat { get; set; }` [#](#property-valueformat) 

[Sparkline.cs:41](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/Sparkline.cs#L41)

Gets or sets the shared numeric display policy, compact by default.

## Extension Methods

 `public static Sparkline Color(Sparkline sparkline, ChartColor? value)` [#](#extension-color-chartforgex-core-sparkline-nullable-chartforgex-primitives-chartcolor) 

Sets [Sparkline.Color](/api/chartforgex-core-sparkline/): Gets or sets the optional series colour; null uses the shared theme.

Parameters

**sparkline ChartForgeX.Core.Sparkline required**

The instance.

**value ChartForgeX.Primitives.ChartColor? required**

The value.

Returns

 `Sparkline` The same instance. 

Examples

```csharp
// C# initializer or property    // C# fluent
sparkline.Color = value;         sparkline.Color(value);
```

 `public static Sparkline Smooth(Sparkline sparkline, bool value = true)` [#](#extension-smooth-chartforgex-core-sparkline-boolean) 

Sets [Sparkline.Smooth](/api/chartforgex-core-sparkline/): Gets or sets whether line and area segments use the shared curve interpolation.

Parameters

**sparkline ChartForgeX.Core.Sparkline required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `Sparkline` The same instance. 

Examples

```csharp
// C# initializer or property    // C# fluent
sparkline.Smooth = value;        sparkline.Smooth(value);
```

 `public static Sparkline Style(Sparkline sparkline, SparklineStyle value)` [#](#extension-style-chartforgex-core-sparkline-chartforgex-core-sparklinestyle) 

Sets [Sparkline.Style](/api/chartforgex-core-sparkline/): Gets or sets the compact mark style.

Parameters

**sparkline ChartForgeX.Core.Sparkline required**

The instance.

**value ChartForgeX.Core.SparklineStyle required**

The value.

Returns

 `Sparkline` The same instance. 

Examples

```csharp
// C# initializer or property    // C# fluent
sparkline.Style = value;         sparkline.Style(value);
```

 `public static Sparkline ValueFormat(Sparkline sparkline, ChartValueFormat value)` [#](#extension-valueformat-chartforgex-core-sparkline-chartforgex-core-chartvalueformat) 

Sets [Sparkline.ValueFormat](/api/chartforgex-core-sparkline/): Gets or sets the shared numeric display policy, compact by default.

Parameters

**sparkline ChartForgeX.Core.Sparkline required**

The instance.

**value ChartForgeX.Core.ChartValueFormat required**

The value.

Returns

 `Sparkline` The same instance. 

Examples

```csharp
// C# initializer or property     // C# fluent
sparkline.ValueFormat = value;    sparkline.ValueFormat(value);
```

<!-- PowerForge markdown artifact sha256:F3282A643B690DBF1F6BFD74619D808A129D85AC8B31EF95349549CE796A42E5 -->
