# ChartGridLineStyle

Defines reusable visual tokens for cartesian grid and guide lines.

 Class  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[ChartGridLineStyle.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L11)

**Modifiers**

sealed

**Attributes**

 `Fluent(Copy = "Clone")` 

Defines reusable visual tokens for cartesian grid and guide lines.

## Inheritance

- object
- ChartGridLineStyle

## Usage

 Explore 37 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 19

- Extension method [ChartGridLineStyle.Dash](/api/chartforgex-core-chartgridlinestyle/#extension-dash-chartforgex-core-chartgridlinestyle-double-double)
- Extension method [ChartGridLineStyle.Gap](/api/chartforgex-core-chartgridlinestyle/#extension-gap-chartforgex-core-chartgridlinestyle-double)
- Extension method [ChartGridLineStyle.HorizontalOpacity](/api/chartforgex-core-chartgridlinestyle/#extension-horizontalopacity-chartforgex-core-chartgridlinestyle-double)
- Extension method [ChartGridLineStyle.ShowHorizontalLines](/api/chartforgex-core-chartgridlinestyle/#extension-showhorizontallines-chartforgex-core-chartgridlinestyle-boolean)
- Extension method [ChartGridLineStyle.ShowVerticalLines](/api/chartforgex-core-chartgridlinestyle/#extension-showverticallines-chartforgex-core-chartgridlinestyle-boolean)
- Extension method [ChartGridLineStyle.StrokeWidth](/api/chartforgex-core-chartgridlinestyle/#extension-strokewidth-chartforgex-core-chartgridlinestyle-double)
- Extension method [ChartGridLineStyle.VerticalOpacity](/api/chartforgex-core-chartgridlinestyle/#extension-verticalopacity-chartforgex-core-chartgridlinestyle-double)
- Method [ChartGridLineStyle.Clone](/api/chartforgex-core-chartgridlinestyle/#method-clone)
- Method [ChartGridLineStyle.DashboardVerticalGuides](/api/chartforgex-core-chartgridlinestyle/#method-dashboardverticalguides)
- Method [ChartGridLineStyle.Default](/api/chartforgex-core-chartgridlinestyle/#method-default)
- Method [ChartGridLineStyleFluent.Dash](/api/chartforgex-core-chartgridlinestylefluent/#method-dash-chartforgex-core-chartgridlinestyle-double-double)
- Method [ChartGridLineStyleFluent.Gap](/api/chartforgex-core-chartgridlinestylefluent/#method-gap-chartforgex-core-chartgridlinestyle-double)
- Method [ChartGridLineStyleFluent.HorizontalOpacity](/api/chartforgex-core-chartgridlinestylefluent/#method-horizontalopacity-chartforgex-core-chartgridlinestyle-double)
- Method [ChartGridLineStyleFluent.ShowHorizontalLines](/api/chartforgex-core-chartgridlinestylefluent/#method-showhorizontallines-chartforgex-core-chartgridlinestyle-boolean)
- Method [ChartGridLineStyleFluent.ShowVerticalLines](/api/chartforgex-core-chartgridlinestylefluent/#method-showverticallines-chartforgex-core-chartgridlinestyle-boolean)
- Method [ChartGridLineStyleFluent.StrokeWidth](/api/chartforgex-core-chartgridlinestylefluent/#method-strokewidth-chartforgex-core-chartgridlinestyle-double)
- Method [ChartGridLineStyleFluent.VerticalOpacity](/api/chartforgex-core-chartgridlinestylefluent/#method-verticalopacity-chartforgex-core-chartgridlinestyle-double)
- Property [ChartOptions.GridLineStyle](/api/chartforgex-core-chartoptions/#property-gridlinestyle)
- Property [VisualArtifactInterchangeWaterfallArtifact.GridStyle](/api/chartforgex-visualartifacts-visualartifactinterchangewaterfallartifact/#property-gridstyle)

### Accepted by parameters 18

- Extension method [Chart.GridLineStyle](/api/chartforgex-core-chart/#extension-gridlinestyle-chartforgex-core-chart-action-chartforgex-core-chartgridlinestyle) parameter `configure`
- Extension method [Chart.GridLineStyle](/api/chartforgex-core-chart/#extension-gridlinestyle-chartforgex-core-chart-chartforgex-core-chartgridlinestyle) parameter `style`
- Method [ChartFluent.GridLineStyle](/api/chartforgex-core-chartfluent/#method-gridlinestyle-chartforgex-core-chart-action-chartforgex-core-chartgridlinestyle) parameter `configure`
- Method [ChartFluent.GridLineStyle](/api/chartforgex-core-chartfluent/#method-gridlinestyle-chartforgex-core-chart-chartforgex-core-chartgridlinestyle) parameter `style`
- Extension method [ChartGridLineStyle.Dash](/api/chartforgex-core-chartgridlinestyle/#extension-dash-chartforgex-core-chartgridlinestyle-double-double) parameter `chartGridLineStyle`
- Extension method [ChartGridLineStyle.Gap](/api/chartforgex-core-chartgridlinestyle/#extension-gap-chartforgex-core-chartgridlinestyle-double) parameter `chartGridLineStyle`
- Extension method [ChartGridLineStyle.HorizontalOpacity](/api/chartforgex-core-chartgridlinestyle/#extension-horizontalopacity-chartforgex-core-chartgridlinestyle-double) parameter `chartGridLineStyle`
- Extension method [ChartGridLineStyle.ShowHorizontalLines](/api/chartforgex-core-chartgridlinestyle/#extension-showhorizontallines-chartforgex-core-chartgridlinestyle-boolean) parameter `chartGridLineStyle`
- Extension method [ChartGridLineStyle.ShowVerticalLines](/api/chartforgex-core-chartgridlinestyle/#extension-showverticallines-chartforgex-core-chartgridlinestyle-boolean) parameter `chartGridLineStyle`
- Extension method [ChartGridLineStyle.StrokeWidth](/api/chartforgex-core-chartgridlinestyle/#extension-strokewidth-chartforgex-core-chartgridlinestyle-double) parameter `chartGridLineStyle`
- Extension method [ChartGridLineStyle.VerticalOpacity](/api/chartforgex-core-chartgridlinestyle/#extension-verticalopacity-chartforgex-core-chartgridlinestyle-double) parameter `chartGridLineStyle`
- Method [ChartGridLineStyleFluent.Dash](/api/chartforgex-core-chartgridlinestylefluent/#method-dash-chartforgex-core-chartgridlinestyle-double-double) parameter `chartGridLineStyle`
- Method [ChartGridLineStyleFluent.Gap](/api/chartforgex-core-chartgridlinestylefluent/#method-gap-chartforgex-core-chartgridlinestyle-double) parameter `chartGridLineStyle`
- Method [ChartGridLineStyleFluent.HorizontalOpacity](/api/chartforgex-core-chartgridlinestylefluent/#method-horizontalopacity-chartforgex-core-chartgridlinestyle-double) parameter `chartGridLineStyle`
- Method [ChartGridLineStyleFluent.ShowHorizontalLines](/api/chartforgex-core-chartgridlinestylefluent/#method-showhorizontallines-chartforgex-core-chartgridlinestyle-boolean) parameter `chartGridLineStyle`
- Method [ChartGridLineStyleFluent.ShowVerticalLines](/api/chartforgex-core-chartgridlinestylefluent/#method-showverticallines-chartforgex-core-chartgridlinestyle-boolean) parameter `chartGridLineStyle`
- Method [ChartGridLineStyleFluent.StrokeWidth](/api/chartforgex-core-chartgridlinestylefluent/#method-strokewidth-chartforgex-core-chartgridlinestyle-double) parameter `chartGridLineStyle`
- Method [ChartGridLineStyleFluent.VerticalOpacity](/api/chartforgex-core-chartgridlinestylefluent/#method-verticalopacity-chartforgex-core-chartgridlinestyle-double) parameter `chartGridLineStyle`

 Filter members   

    Show inherited   

 

## Constructors

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

[ChartGridLineStyle.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L11)

## Methods

 `public ChartGridLineStyle Clone()` [#](#method-clone) 

[ChartGridLineStyle.cs:109](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L109)

Creates a copy that can be safely reused and customized.

Returns

 `ChartGridLineStyle` 

 `public static ChartGridLineStyle DashboardVerticalGuides()` [#](#method-dashboardverticalguides) 

[ChartGridLineStyle.cs:94](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L94)

Creates a dashboard guide style with vertical dashed category guides.

Returns

 `ChartGridLineStyle` 

 `public static ChartGridLineStyle Default()` [#](#method-default) 

[ChartGridLineStyle.cs:89](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L89)

Creates the default cartesian grid style.

Returns

 `ChartGridLineStyle` 

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

[ChartGridLineStyle.cs:20](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L20)

Gets or sets whether horizontal value grid lines are drawn.

 `public bool ShowVerticalLines { get; set; }` [#](#property-showverticallines) 

[ChartGridLineStyle.cs:25](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L25)

Gets or sets whether vertical category grid lines are drawn.

 `public double HorizontalOpacity { get; set; }` [#](#property-horizontalopacity) 

[ChartGridLineStyle.cs:31](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L31)

Gets or sets horizontal grid line opacity.

 `public double VerticalOpacity { get; set; }` [#](#property-verticalopacity) 

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

Gets or sets vertical grid line opacity.

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

[ChartGridLineStyle.cs:53](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L53)

Gets or sets grid line stroke width.

 `public double Dash { get; set; }` [#](#property-dash) 

[ChartGridLineStyle.cs:66](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L66)

Gets or sets the dash length. Zero renders solid lines.

 `public double Gap { get; set; }` [#](#property-gap) 

[ChartGridLineStyle.cs:78](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.cs#L78)

Gets or sets the dash gap length.

## Extension Methods

 Dash 2 overloads 

 `public static ChartGridLineStyle Dash(ChartGridLineStyle chartGridLineStyle, double dash, double gap)` [#](#extension-dash-chartforgex-core-chartgridlinestyle-double-double) 

[ChartGridLineStyle.Fluent.cs:12](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGridLineStyle.Fluent.cs#L12)

Sets the dash and gap lengths. Use zero dash for solid lines.

Parameters

**chartGridLineStyle ChartForgeX.Core.ChartGridLineStyle required**

**dash double required**

**gap double required**

Returns

 `ChartGridLineStyle` 

 `public static ChartGridLineStyle Dash(ChartGridLineStyle chartGridLineStyle, double value)` [#](#extension-dash-chartforgex-core-chartgridlinestyle-double) 

Sets [ChartGridLineStyle.Dash](/api/chartforgex-core-chartgridlinestyle/): Gets or sets the dash length. Zero renders solid lines.

Parameters

**chartGridLineStyle ChartForgeX.Core.ChartGridLineStyle required**

The instance.

**value double required**

The value.

Returns

 `ChartGridLineStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                        // C# fluent
new global::ChartForgeX.Core.ChartGridLineStyle { Dash = value };    chartGridLineStyle.Dash(value);
```

 `public static ChartGridLineStyle Gap(ChartGridLineStyle chartGridLineStyle, double value)` [#](#extension-gap-chartforgex-core-chartgridlinestyle-double) 

Sets [ChartGridLineStyle.Gap](/api/chartforgex-core-chartgridlinestyle/): Gets or sets the dash gap length.

Parameters

**chartGridLineStyle ChartForgeX.Core.ChartGridLineStyle required**

The instance.

**value double required**

The value.

Returns

 `ChartGridLineStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                       // C# fluent
new global::ChartForgeX.Core.ChartGridLineStyle { Gap = value };    chartGridLineStyle.Gap(value);
```

 `public static ChartGridLineStyle HorizontalOpacity(ChartGridLineStyle chartGridLineStyle, double value)` [#](#extension-horizontalopacity-chartforgex-core-chartgridlinestyle-double) 

Sets [ChartGridLineStyle.HorizontalOpacity](/api/chartforgex-core-chartgridlinestyle/): Gets or sets horizontal grid line opacity.

Parameters

**chartGridLineStyle ChartForgeX.Core.ChartGridLineStyle required**

The instance.

**value double required**

The value.

Returns

 `ChartGridLineStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                                     // C# fluent
new global::ChartForgeX.Core.ChartGridLineStyle { HorizontalOpacity = value };    chartGridLineStyle.HorizontalOpacity(value);
```

 `public static ChartGridLineStyle ShowHorizontalLines(ChartGridLineStyle chartGridLineStyle, bool value = true)` [#](#extension-showhorizontallines-chartforgex-core-chartgridlinestyle-boolean) 

Sets [ChartGridLineStyle.ShowHorizontalLines](/api/chartforgex-core-chartgridlinestyle/): Gets or sets whether horizontal value grid lines are drawn.

Parameters

**chartGridLineStyle ChartForgeX.Core.ChartGridLineStyle required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `ChartGridLineStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                                       // C# fluent
new global::ChartForgeX.Core.ChartGridLineStyle { ShowHorizontalLines = value };    chartGridLineStyle.ShowHorizontalLines(value);
```

 `public static ChartGridLineStyle ShowVerticalLines(ChartGridLineStyle chartGridLineStyle, bool value = true)` [#](#extension-showverticallines-chartforgex-core-chartgridlinestyle-boolean) 

Sets [ChartGridLineStyle.ShowVerticalLines](/api/chartforgex-core-chartgridlinestyle/): Gets or sets whether vertical category grid lines are drawn.

Parameters

**chartGridLineStyle ChartForgeX.Core.ChartGridLineStyle required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `ChartGridLineStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                                     // C# fluent
new global::ChartForgeX.Core.ChartGridLineStyle { ShowVerticalLines = value };    chartGridLineStyle.ShowVerticalLines(value);
```

 `public static ChartGridLineStyle StrokeWidth(ChartGridLineStyle chartGridLineStyle, double value)` [#](#extension-strokewidth-chartforgex-core-chartgridlinestyle-double) 

Sets [ChartGridLineStyle.StrokeWidth](/api/chartforgex-core-chartgridlinestyle/): Gets or sets grid line stroke width.

Parameters

**chartGridLineStyle ChartForgeX.Core.ChartGridLineStyle required**

The instance.

**value double required**

The value.

Returns

 `ChartGridLineStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::ChartForgeX.Core.ChartGridLineStyle { StrokeWidth = value };    chartGridLineStyle.StrokeWidth(value);
```

 `public static ChartGridLineStyle VerticalOpacity(ChartGridLineStyle chartGridLineStyle, double value)` [#](#extension-verticalopacity-chartforgex-core-chartgridlinestyle-double) 

Sets [ChartGridLineStyle.VerticalOpacity](/api/chartforgex-core-chartgridlinestyle/): Gets or sets vertical grid line opacity.

Parameters

**chartGridLineStyle ChartForgeX.Core.ChartGridLineStyle required**

The instance.

**value double required**

The value.

Returns

 `ChartGridLineStyle` The same instance. 

Examples

```csharp
// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.Core.ChartGridLineStyle { VerticalOpacity = value };    chartGridLineStyle.VerticalOpacity(value);
```

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