# ChartGridFluent

Hand-written fluent methods of ChartGrid that do more than set one property.

 Class  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[ChartGrid.Fluent.cs:21](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGrid.Fluent.cs#L21)

**Modifiers**

static

Hand-written fluent methods of [ChartGrid](/api/chartforgex-core-chartgrid/) that do more than set one property.

## Inheritance

- object
- ChartGridFluent

 Filter members   

    Show inherited   

 

## Methods

 `public static ChartGrid Accessibility(ChartGrid chartGrid, Action<VisualAccessibility> configure)` [#](#method-accessibility-chartforgex-core-chartgrid-action-chartforgex-accessibility-visualaccessibility) 

Configures [ChartGrid.Accessibility](/api/chartforgex-core-chartgrid/) in place: Gets the text alternative for the complete chart comparison.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**configure System.Action<ChartForgeX.Accessibility.VisualAccessibility> required**

Configures the value.

Returns

 `ChartGrid` The same instance. 

 `public static ChartGrid Columns(ChartGrid chartGrid, int value)` [#](#method-columns-chartforgex-core-chartgrid-int32) 

Sets [ChartGrid.Columns](/api/chartforgex-core-chartgrid/): Gets or sets the preferred number of columns on wide viewports.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value int required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                  // C# fluent
new global::ChartForgeX.Core.ChartGrid { Columns = value };    chartGrid.Columns(value);
```

 `public static ChartGrid Gap(ChartGrid chartGrid, int value)` [#](#method-gap-chartforgex-core-chartgrid-int32) 

Sets [ChartGrid.Gap](/api/chartforgex-core-chartgrid/): Gets or sets the gap between charts in pixels.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value int required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

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

 `public static ChartGrid Padding(ChartGrid chartGrid, int value)` [#](#method-padding-chartforgex-core-chartgrid-int32) 

Sets [ChartGrid.Padding](/api/chartforgex-core-chartgrid/): Gets or sets the outer padding around exported grid content in pixels.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value int required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                  // C# fluent
new global::ChartForgeX.Core.ChartGrid { Padding = value };    chartGrid.Padding(value);
```

 `public static ChartGrid PanelFit(ChartGrid chartGrid, VisualPanelFit value)` [#](#method-panelfit-chartforgex-core-chartgrid-chartforgex-primitives-visualpanelfit) 

Sets [ChartGrid.PanelFit](/api/chartforgex-core-chartgrid/): Gets or sets how charts fit inside fixed-size grid panels.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value ChartForgeX.Primitives.VisualPanelFit required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                   // C# fluent
new global::ChartForgeX.Core.ChartGrid { PanelFit = value };    chartGrid.PanelFit(value);
```

 PanelSize 2 overloads 

 `public static ChartGrid PanelSize(ChartGrid chartGrid, int width, int height)` [#](#method-panelsize-chartforgex-core-chartgrid-int32-int32) 

[ChartGrid.Fluent.cs:21](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartGrid.Fluent.cs#L21)

Sets a fixed panel size for composed SVG and PNG grid exports.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance to configure.

**width int required**

The panel width in pixels.

**height int required**

The panel height in pixels.

Returns

 `ChartGrid` The current chart grid. 

 `public static ChartGrid PanelSize(ChartGrid chartGrid, ChartSize? value)` [#](#method-panelsize-chartforgex-core-chartgrid-nullable-chartforgex-primitives-chartsize) 

Sets [ChartGrid.PanelSize](/api/chartforgex-core-chartgrid/): Gets or sets the optional fixed panel size used by composed SVG and PNG grid exports.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value ChartForgeX.Primitives.ChartSize? required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                    // C# fluent
new global::ChartForgeX.Core.ChartGrid { PanelSize = value };    chartGrid.PanelSize(value);
```

 `public static ChartGrid PreserveEmptyColumns(ChartGrid chartGrid, bool value = true)` [#](#method-preserveemptycolumns-chartforgex-core-chartgrid-boolean) 

Sets [ChartGrid.PreserveEmptyColumns](/api/chartforgex-core-chartgrid/): Gets or sets whether composed SVG and PNG exports retain columns without charts.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::ChartForgeX.Core.ChartGrid { PreserveEmptyColumns = value };    chartGrid.PreserveEmptyColumns(value);
```

 `public static ChartGrid RasterScale(ChartGrid chartGrid, int value)` [#](#method-rasterscale-chartforgex-core-chartgrid-int32) 

Sets [ChartGrid.RasterScale](/api/chartforgex-core-chartgrid/): Gets or sets the output pixel multiplier used by composed PNG grid exports.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value int required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                      // C# fluent
new global::ChartForgeX.Core.ChartGrid { RasterScale = value };    chartGrid.RasterScale(value);
```

 `public static ChartGrid Subtitle(ChartGrid chartGrid, string value)` [#](#method-subtitle-chartforgex-core-chartgrid-string) 

Sets [ChartGrid.Subtitle](/api/chartforgex-core-chartgrid/): Gets or sets the report subtitle.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value string required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                   // C# fluent
new global::ChartForgeX.Core.ChartGrid { Subtitle = value };    chartGrid.Subtitle(value);
```

 SubtitleStyle 2 overloads 

 `public static ChartGrid SubtitleStyle(ChartGrid chartGrid, TextStyleOverride value)` [#](#method-subtitlestyle-chartforgex-core-chartgrid-chartforgex-typography-textstyleoverride) 

Sets [ChartGrid.SubtitleStyle](/api/chartforgex-core-chartgrid/): Gets the text style used for the grid subtitle.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value ChartForgeX.Typography.TextStyleOverride required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                        // C# fluent
new global::ChartForgeX.Core.ChartGrid { SubtitleStyle = value };    chartGrid.SubtitleStyle(value);
```

 `public static ChartGrid SubtitleStyle(ChartGrid chartGrid, Action<TextStyleOverride> configure)` [#](#method-subtitlestyle-chartforgex-core-chartgrid-action-chartforgex-typography-textstyleoverride) 

Configures a copy of [ChartGrid.SubtitleStyle](/api/chartforgex-core-chartgrid/) (a new one when not set) and assigns a copy of it once the callback returns, leaving the property unchanged when the callback throws: Gets the text style used for the grid subtitle.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**configure System.Action<ChartForgeX.Typography.TextStyleOverride> required**

Configures the copy.

Returns

 `ChartGrid` The same instance. 

 `public static ChartGrid SvgColorVariables(ChartGrid chartGrid, SvgColorVariables? value)` [#](#method-svgcolorvariables-chartforgex-core-chartgrid-chartforgex-themes-svgcolorvariables) 

Sets [ChartGrid.SvgColorVariables](/api/chartforgex-core-chartgrid/): Gets or sets the CSS custom properties the grid SVG writes for mapped colours (see [SvgColorVariables](/api/chartforgex-themes-svgcolorvariables/)): the grid title, background, and every panel, including charts without their own variables. With [ChartGrid.UsePanelThemes](/api/chartforgex-core-chartgrid/) enabled, this mapping applies only to the outer frame; each panel retains its chart mapping or literal colours. PNG output always uses literal colours.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value ChartForgeX.Themes.SvgColorVariables? required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::ChartForgeX.Core.ChartGrid { SvgColorVariables = value };    chartGrid.SvgColorVariables(value);
```

 `public static ChartGrid Theme(ChartGrid chartGrid, VisualTheme value)` [#](#method-theme-chartforgex-core-chartgrid-chartforgex-themes-visualtheme) 

Sets [ChartGrid.Theme](/api/chartforgex-core-chartgrid/): Gets or sets the paired theme for the grid frame and, by default, every panel.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value ChartForgeX.Themes.VisualTheme required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                // C# fluent
new global::ChartForgeX.Core.ChartGrid { Theme = value };    chartGrid.Theme(value);
```

 `public static ChartGrid ThemeMode(ChartGrid chartGrid, ThemeMode value)` [#](#method-thememode-chartforgex-core-chartgrid-chartforgex-thememode) 

Sets [ChartGrid.ThemeMode](/api/chartforgex-core-chartgrid/): Gets or sets the explicit palette mode for the grid frame and shared panels.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value ChartForgeX.ThemeMode required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                    // C# fluent
new global::ChartForgeX.Core.ChartGrid { ThemeMode = value };    chartGrid.ThemeMode(value);
```

 `public static ChartGrid Title(ChartGrid chartGrid, string value)` [#](#method-title-chartforgex-core-chartgrid-string) 

Sets [ChartGrid.Title](/api/chartforgex-core-chartgrid/): Gets or sets the report title.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value string required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                // C# fluent
new global::ChartForgeX.Core.ChartGrid { Title = value };    chartGrid.Title(value);
```

 TitleStyle 2 overloads 

 `public static ChartGrid TitleStyle(ChartGrid chartGrid, TextStyleOverride value)` [#](#method-titlestyle-chartforgex-core-chartgrid-chartforgex-typography-textstyleoverride) 

Sets [ChartGrid.TitleStyle](/api/chartforgex-core-chartgrid/): Gets the text style used for the grid title.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value ChartForgeX.Typography.TextStyleOverride required**

The value.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                     // C# fluent
new global::ChartForgeX.Core.ChartGrid { TitleStyle = value };    chartGrid.TitleStyle(value);
```

 `public static ChartGrid TitleStyle(ChartGrid chartGrid, Action<TextStyleOverride> configure)` [#](#method-titlestyle-chartforgex-core-chartgrid-action-chartforgex-typography-textstyleoverride) 

Configures a copy of [ChartGrid.TitleStyle](/api/chartforgex-core-chartgrid/) (a new one when not set) and assigns a copy of it once the callback returns, leaving the property unchanged when the callback throws: Gets the text style used for the grid title.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**configure System.Action<ChartForgeX.Typography.TextStyleOverride> required**

Configures the copy.

Returns

 `ChartGrid` The same instance. 

 `public static ChartGrid UsePanelThemes(ChartGrid chartGrid, bool value = true)` [#](#method-usepanelthemes-chartforgex-core-chartgrid-boolean) 

Sets [ChartGrid.UsePanelThemes](/api/chartforgex-core-chartgrid/): Gets or sets whether each panel retains its chart's authored theme, mode and font request.

Parameters

**chartGrid ChartForgeX.Core.ChartGrid required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `ChartGrid` The same instance. 

Examples

```csharp
// C# initializer or property                                         // C# fluent
new global::ChartForgeX.Core.ChartGrid { UsePanelThemes = value };    chartGrid.UsePanelThemes(value);
```

## 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?` 

<!-- PowerForge markdown artifact sha256:628D5D7A8AFBA7304132008435656054CB52112F25CAC6F3E31DD873FBB6DF31 -->
