# HtmlChartCrosshairOptions

Configures HTML crosshair presentation independently of tooltip acquisition and palette.

 Class  

`ChartForgeX.Interactivity.Html`

**Namespace**

`ChartForgeX.Interactivity.Html`

**Assembly**

`ChartForgeX.Interactivity.Html`

**Source**

[HtmlChartCrosshairOptions.cs:18](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlChartCrosshairOptions.cs#L18)

**Modifiers**

sealed

**Attributes**

 `Fluent` 

Configures HTML crosshair presentation independently of tooltip acquisition and palette.

## Inheritance

- object
- HtmlChartCrosshairOptions

## Usage

 Explore 22 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 10

- Extension method [HtmlChartCrosshairOptions.LineStyle](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/#extension-linestyle-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-interactivity-html-htmlchartcrosshairlinestyle)
- Extension method [HtmlChartCrosshairOptions.ShowLabel](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/#extension-showlabel-chartforgex-interactivity-html-htmlchartcrosshairoptions-boolean)
- Extension method [HtmlChartCrosshairOptions.Stroke](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/#extension-stroke-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-primitives-chartcolor)
- Extension method [HtmlChartCrosshairOptions.StrokeWidth](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/#extension-strokewidth-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-system-double)
- Method [HtmlChartCrosshairOptionsFluent.LineStyle](/api/chartforgex-interactivity-html-htmlchartcrosshairoptionsfluent/#method-linestyle-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-interactivity-html-htmlchartcrosshairlinestyle)
- Method [HtmlChartCrosshairOptionsFluent.ShowLabel](/api/chartforgex-interactivity-html-htmlchartcrosshairoptionsfluent/#method-showlabel-chartforgex-interactivity-html-htmlchartcrosshairoptions-boolean)
- Method [HtmlChartCrosshairOptionsFluent.Stroke](/api/chartforgex-interactivity-html-htmlchartcrosshairoptionsfluent/#method-stroke-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-primitives-chartcolor)
- Method [HtmlChartCrosshairOptionsFluent.StrokeWidth](/api/chartforgex-interactivity-html-htmlchartcrosshairoptionsfluent/#method-strokewidth-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-system-double)
- Property [HtmlChartInteractionOptions.Crosshair](/api/chartforgex-interactivity-html-htmlchartinteractionoptions/#property-crosshair)
- Property [HtmlInteractiveDashboardOptions.Crosshair](/api/chartforgex-interactivity-html-htmlinteractivedashboardoptions/#property-crosshair)

### Accepted by parameters 12

- Extension method [HtmlChartCrosshairOptions.LineStyle](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/#extension-linestyle-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-interactivity-html-htmlchartcrosshairlinestyle) parameter `htmlChartCrosshairOptions`
- Extension method [HtmlChartCrosshairOptions.ShowLabel](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/#extension-showlabel-chartforgex-interactivity-html-htmlchartcrosshairoptions-boolean) parameter `htmlChartCrosshairOptions`
- Extension method [HtmlChartCrosshairOptions.Stroke](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/#extension-stroke-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-primitives-chartcolor) parameter `htmlChartCrosshairOptions`
- Extension method [HtmlChartCrosshairOptions.StrokeWidth](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/#extension-strokewidth-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-system-double) parameter `htmlChartCrosshairOptions`
- Method [HtmlChartCrosshairOptionsFluent.LineStyle](/api/chartforgex-interactivity-html-htmlchartcrosshairoptionsfluent/#method-linestyle-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-interactivity-html-htmlchartcrosshairlinestyle) parameter `htmlChartCrosshairOptions`
- Method [HtmlChartCrosshairOptionsFluent.ShowLabel](/api/chartforgex-interactivity-html-htmlchartcrosshairoptionsfluent/#method-showlabel-chartforgex-interactivity-html-htmlchartcrosshairoptions-boolean) parameter `htmlChartCrosshairOptions`
- Method [HtmlChartCrosshairOptionsFluent.Stroke](/api/chartforgex-interactivity-html-htmlchartcrosshairoptionsfluent/#method-stroke-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-primitives-chartcolor) parameter `htmlChartCrosshairOptions`
- Method [HtmlChartCrosshairOptionsFluent.StrokeWidth](/api/chartforgex-interactivity-html-htmlchartcrosshairoptionsfluent/#method-strokewidth-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-system-double) parameter `htmlChartCrosshairOptions`
- Extension method [HtmlChartInteractionOptions.Crosshair](/api/chartforgex-interactivity-html-htmlchartinteractionoptions/#extension-crosshair-chartforgex-interactivity-html-htmlchartinteractionoptions-action-chartforgex-interactivity-html-htmlchartcrosshairoptions) parameter `configure`
- Method [HtmlChartInteractionOptionsFluent.Crosshair](/api/chartforgex-interactivity-html-htmlchartinteractionoptionsfluent/#method-crosshair-chartforgex-interactivity-html-htmlchartinteractionoptions-action-chartforgex-interactivity-html-htmlchartcrosshairoptions) parameter `configure`
- Extension method [HtmlInteractiveDashboardOptions.Crosshair](/api/chartforgex-interactivity-html-htmlinteractivedashboardoptions/#extension-crosshair-chartforgex-interactivity-html-htmlinteractivedashboardoptions-action-chartforgex-interactivity-html-htmlchartcrosshairoptions) parameter `configure`
- Method [HtmlInteractiveDashboardOptionsFluent.Crosshair](/api/chartforgex-interactivity-html-htmlinteractivedashboardoptionsfluent/#method-crosshair-chartforgex-interactivity-html-htmlinteractivedashboardoptions-action-chartforgex-interactivity-html-htmlchartcrosshairoptions) parameter `configure`

 Filter members   

    Show inherited   

 

## Constructors

 `public HtmlChartCrosshairOptions()` [#](#constructor-ctor) 

[HtmlChartCrosshairOptions.cs:18](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlChartCrosshairOptions.cs#L18)

## 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 bool ShowLabel { get; set; }` [#](#property-showlabel) 

[HtmlChartCrosshairOptions.cs:18](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlChartCrosshairOptions.cs#L18)

Gets or sets whether the crosshair includes a target label. The default is true for every palette. The [ChartInteractionFeatures.Crosshair](/api/chartforgex-interactivity-chartinteractionfeatures/) feature controls whether the guide is enabled.

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

[HtmlChartCrosshairOptions.cs:25](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlChartCrosshairOptions.cs#L25)

Gets or sets the color of both guide lines. Null retains the palette's line color. A transparent color hides the lines while retaining the label and guide identity. Explicit line styling uses a crisp stroke without glow.

 `public double? StrokeWidth { get; set; }` [#](#property-strokewidth) 

[HtmlChartCrosshairOptions.cs:33](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlChartCrosshairOptions.cs#L33)

Gets or sets the finite, non-negative width of both guide lines in CSS pixels. Null retains the default width. Zero hides the lines without disabling the guide or its label.

Exceptions

- `ArgumentOutOfRangeException` – The width is negative or non-finite.

 `public HtmlChartCrosshairLineStyle? LineStyle { get; set; }` [#](#property-linestyle) 

[HtmlChartCrosshairOptions.cs:44](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Interactivity.Html/HtmlChartCrosshairOptions.cs#L44)

Gets or sets the pattern of both guide lines. Null retains the default dashed pattern for every palette.

Exceptions

- `ArgumentOutOfRangeException` – The line style is not a defined enum value.

## Extension Methods

 `public static HtmlChartCrosshairOptions LineStyle(HtmlChartCrosshairOptions htmlChartCrosshairOptions, HtmlChartCrosshairLineStyle? value)` [#](#extension-linestyle-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-interactivity-html-htmlchartcrosshairlinestyle) 

Sets [HtmlChartCrosshairOptions.LineStyle](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/): Gets or sets the pattern of both guide lines. Null retains the default dashed pattern for every palette.

Parameters

**htmlChartCrosshairOptions ChartForgeX.Interactivity.Html.HtmlChartCrosshairOptions required**

The instance.

**value ChartForgeX.Interactivity.Html.HtmlChartCrosshairLineStyle? required**

The value.

Returns

 `HtmlChartCrosshairOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                                                  // C# fluent
new global::ChartForgeX.Interactivity.Html.HtmlChartCrosshairOptions { LineStyle = value };    htmlChartCrosshairOptions.LineStyle(value);
```

 `public static HtmlChartCrosshairOptions ShowLabel(HtmlChartCrosshairOptions htmlChartCrosshairOptions, bool value = true)` [#](#extension-showlabel-chartforgex-interactivity-html-htmlchartcrosshairoptions-boolean) 

Sets [HtmlChartCrosshairOptions.ShowLabel](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/): Gets or sets whether the crosshair includes a target label. The default is true for every palette. The [ChartInteractionFeatures.Crosshair](/api/chartforgex-interactivity-chartinteractionfeatures/) feature controls whether the guide is enabled.

Parameters

**htmlChartCrosshairOptions ChartForgeX.Interactivity.Html.HtmlChartCrosshairOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `HtmlChartCrosshairOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                                                  // C# fluent
new global::ChartForgeX.Interactivity.Html.HtmlChartCrosshairOptions { ShowLabel = value };    htmlChartCrosshairOptions.ShowLabel(value);
```

 `public static HtmlChartCrosshairOptions Stroke(HtmlChartCrosshairOptions htmlChartCrosshairOptions, ChartColor? value)` [#](#extension-stroke-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-chartforgex-primitives-chartcolor) 

Sets [HtmlChartCrosshairOptions.Stroke](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/): Gets or sets the color of both guide lines. Null retains the palette's line color. A transparent color hides the lines while retaining the label and guide identity. Explicit line styling uses a crisp stroke without glow.

Parameters

**htmlChartCrosshairOptions ChartForgeX.Interactivity.Html.HtmlChartCrosshairOptions required**

The instance.

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

The value.

Returns

 `HtmlChartCrosshairOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                                               // C# fluent
new global::ChartForgeX.Interactivity.Html.HtmlChartCrosshairOptions { Stroke = value };    htmlChartCrosshairOptions.Stroke(value);
```

 `public static HtmlChartCrosshairOptions StrokeWidth(HtmlChartCrosshairOptions htmlChartCrosshairOptions, double? value)` [#](#extension-strokewidth-chartforgex-interactivity-html-htmlchartcrosshairoptions-nullable-system-double) 

Sets [HtmlChartCrosshairOptions.StrokeWidth](/api/chartforgex-interactivity-html-htmlchartcrosshairoptions/): Gets or sets the finite, non-negative width of both guide lines in CSS pixels. Null retains the default width. Zero hides the lines without disabling the guide or its label.

Parameters

**htmlChartCrosshairOptions ChartForgeX.Interactivity.Html.HtmlChartCrosshairOptions required**

The instance.

**value double? required**

The value.

Returns

 `HtmlChartCrosshairOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                                                    // C# fluent
new global::ChartForgeX.Interactivity.Html.HtmlChartCrosshairOptions { StrokeWidth = value };    htmlChartCrosshairOptions.StrokeWidth(value);
```

<!-- PowerForge markdown artifact sha256:5EE45A16368B3882DBBA88DEB90D3A3886470EC5F9BF00E71A7218A9BD99A5AE -->
