# ChartStateTimelineSegment

Represents one interval of a state timeline lane. Start and end are OLE Automation dates holding UTC instants.

 Struct  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[ChartStateTimelineSegment.cs:17](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartStateTimelineSegment.cs#L17)

**Base**

`ValueType`

**Modifiers**

sealed

Represents one interval of a state timeline lane. Start and end are OLE Automation dates holding UTC instants. Time between segments is rendered as a gap (no data).

## Inheritance

- ValueType
- ChartStateTimelineSegment

## Usage

 Explore 6 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 2

- Property [ChartSeries.StateTimelineSegments](/api/chartforgex-core-chartseries/#property-statetimelinesegments)
- Method [ChartStateTimelineSegment.WithMarkOptions](/api/chartforgex-core-chartstatetimelinesegment/#method-withmarkoptions-chartforgex-core-chartmarkoptions)

### Accepted by parameters 4

- Method [Chart.AddStateTimelineLane](/api/chartforgex-core-chart/#method-addstatetimelinelane-string-collections-generic-ienumerable-chartforgex-core-chartstatetimelinesegment-string-string-nullable-chartforgex-core-chartseriesid) parameter `segments`
- Method [ChartSeries.CreateStateTimelineLane](/api/chartforgex-core-chartseries/#method-createstatetimelinelane-chartforgex-core-chartseriesid-string-collections-generic-ienumerable-chartforgex-core-chartstatetimelinesegment-string-string) parameter `segments`
- Method [ChartSeries.ReplaceStateTimelineSegments](/api/chartforgex-core-chartseries/#method-replacestatetimelinesegments-collections-generic-ienumerable-chartforgex-core-chartstatetimelinesegment) parameter `values`
- Method [ChartSeries.UpdateStateTimelineSegment](/api/chartforgex-core-chartseries/#method-updatestatetimelinesegment-int32-chartforgex-core-chartstatetimelinesegment) parameter `value`

 Filter members   

    Show inherited   

 

## Constructors

 ChartStateTimelineSegment 2 overloads 

 `public ChartStateTimelineSegment(double start, double end, string state, string? detail = null)` [#](#constructor-ctor-double-double-string-string) 

[ChartStateTimelineSegment.cs:17](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartStateTimelineSegment.cs#L17)

Initializes a segment from OLE Automation date values.

Parameters

**start double required**

The inclusive start instant.

**end double required**

The exclusive end instant; must be later than start.

**state string required**

The key of the state that applies during the interval.

**detail string? = null optional**

Optional detail text shown in tooltips.

 `public ChartStateTimelineSegment(DateTime start, DateTime end, string state, string? detail = null)` [#](#constructor-ctor-datetime-datetime-string-string) 

[ChartStateTimelineSegment.cs:34](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartStateTimelineSegment.cs#L34)

Initializes a segment from date/time values. DateTimeKind.Local values are converted to UTC; DateTimeKind.Unspecified values are treated as UTC. Both instants must be on or after 1899-12-30 UTC. DateTime inputs are rounded to 100-microsecond time-axis resolution; shorter intervals are rejected.

Parameters

**start System.DateTime required**

The inclusive start.

**end System.DateTime required**

The exclusive end; must be later than start.

**state string required**

The key of the state that applies during the interval.

**detail string? = null optional**

Optional detail text shown in tooltips.

## Methods

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

[ChartStateTimelineSegment.cs:56](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartStateTimelineSegment.cs#L56)

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

 `ChartStateTimelineSegment` 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 double Start { get; }` [#](#property-start) 

[ChartStateTimelineSegment.cs:38](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartStateTimelineSegment.cs#L38)

Gets the inclusive start instant as an OLE Automation date.

 `public double End { get; }` [#](#property-end) 

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

Gets the exclusive end instant as an OLE Automation date.

 `public string State { get; }` [#](#property-state) 

[ChartStateTimelineSegment.cs:44](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartStateTimelineSegment.cs#L44)

Gets the state key.

 `public string? Detail { get; }` [#](#property-detail) 

[ChartStateTimelineSegment.cs:47](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartStateTimelineSegment.cs#L47)

Gets optional detail text shown in tooltips.

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

[ChartStateTimelineSegment.cs:51](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartStateTimelineSegment.cs#L51)

Gets optional immutable navigation, accessibility and host metadata.

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