# ChartInterval

Represents one category or x-value with a start and end value.

 Struct  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[ChartInterval.cs:32](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartInterval.cs#L32)

**Base**

`ValueType`

**Modifiers**

sealed

Represents one category or x-value with a start and end value.

## Inheritance

- ValueType
- ChartInterval

## Usage

 Explore 9 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 3

- Method [ChartInterval.WithMarkOptions](/api/chartforgex-core-chartinterval/#method-withmarkoptions-chartforgex-core-chartmarkoptions)
- Property [ChartRangeBarEndpointLabelContext.Interval](/api/chartforgex-core-chartrangebarendpointlabelcontext/#property-interval)
- Property [ChartSeries.Intervals](/api/chartforgex-core-chartseries/#property-intervals)

### Accepted by parameters 6

- Method [Chart.AddRangeBar](/api/chartforgex-core-chart/#method-addrangebar-string-collections-generic-ienumerable-chartforgex-core-chartinterval-nullable-chartforgex-primitives-chartcolor) parameter `intervals`
- Method [Chart.AddRangeBar``1](/api/chartforgex-core-chart/#method-addrangebar-string-collections-generic-ienumerable-func-chartforgex-core-chartinterval-nullable-chartforgex-primitives-chartcolor) parameter `observation`
- Constructor [ChartRangeBarEndpointLabelContext.ChartRangeBarEndpointLabelContext](/api/chartforgex-core-chartrangebarendpointlabelcontext/#constructor-ctor-string-int32-string-chartforgex-core-chartinterval-chartforgex-core-chartrangebarendpoint-string) parameter `interval`
- Method [ChartSeries.CreateRangeBar](/api/chartforgex-core-chartseries/#method-createrangebar-chartforgex-core-chartseriesid-string-collections-generic-ienumerable-chartforgex-core-chartinterval-nullable-chartforgex-primitives-chartcolor) parameter `values`
- Method [ChartSeries.ReplaceIntervals](/api/chartforgex-core-chartseries/#method-replaceintervals-collections-generic-ienumerable-chartforgex-core-chartinterval) parameter `values`
- Method [ChartSeries.UpdateInterval](/api/chartforgex-core-chartseries/#method-updateinterval-int32-chartforgex-core-chartinterval) parameter `value`

 Filter members   

    Show inherited   

 

## Constructors

 ChartInterval 2 overloads 

 `public ChartInterval(double x, double start, double end)` [#](#constructor-ctor-double-double-double) 

[ChartInterval.cs:32](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartInterval.cs#L32)

Initializes a new instance of the [ChartInterval](/api/chartforgex-core-chartinterval/) struct.

Parameters

**x double required**

The category coordinate.

**start double required**

The interval start value.

**end double required**

The interval end value.

 `public ChartInterval(DateTime x, double start, double end)` [#](#constructor-ctor-datetime-double-double) 

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

Initializes a new instance of the [ChartInterval](/api/chartforgex-core-chartinterval/) struct from a date/time x value.

Parameters

**x System.DateTime required**

The date/time category coordinate.

**start double required**

The interval start value.

**end double required**

The interval end value.

## Methods

 `public ChartInterval WithMarkOptions(ChartMarkOptions? options)` [#](#method-withmarkoptions-chartforgex-core-chartmarkoptions) 

[ChartInterval.cs:55](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartInterval.cs#L55)

Returns a copy with replacement mark metadata, retaining all authored values.

Parameters

**options ChartForgeX.Core.ChartMarkOptions? required**

Immutable metadata, or null to clear it.

Returns

 `ChartInterval` A new observation. The current observation is unchanged. 

## Inherited Methods

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

Inherited from ValueType

Parameters

**obj object? required**

Returns

 `bool` 

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

Inherited from ValueType

Returns

 `int` 

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

Inherited from object

Returns

 `Type` 

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

Inherited from ValueType

Returns

 `string?` 

## Properties

 `public ChartMarkOptions? MarkOptions { get; }` [#](#property-markoptions) 

[ChartInterval.cs:50](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartInterval.cs#L50)

Gets optional immutable navigation, accessibility and host metadata.

## Fields

 `public readonly double X` [#](#field-x) 

[ChartInterval.cs:13](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartInterval.cs#L13)

Gets the category coordinate, mapped to X for vertical range bars and Y for horizontal range bars.

 `public readonly double Start` [#](#field-start) 

[ChartInterval.cs:18](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartInterval.cs#L18)

Gets the interval start value.

 `public readonly double End` [#](#field-end) 

[ChartInterval.cs:23](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartInterval.cs#L23)

Gets the interval end value.

<!-- PowerForge markdown artifact sha256:63EFACCA6DDB566813C248307F5460C36F9F0304E994C9844AE0C5ADA4461264 -->
