# ChartLegendOptionsFluent

The fluent methods of ChartLegendOptions, generated from its public properties: A property-named method sets a property and a singular-named method adds…

 Class  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Modifiers**

static

The fluent methods of [ChartLegendOptions](/api/chartforgex-core-chartlegendoptions/), generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

## Inheritance

- object
- ChartLegendOptionsFluent

 Filter members   

    Show inherited   

 

## Methods

 `public static ChartLegendOptions Item(ChartLegendOptions chartLegendOptions, ChartLegendItem item)` [#](#method-item-chartforgex-core-chartlegendoptions-chartforgex-core-chartlegenditem) 

Adds an item to [ChartLegendOptions.Items](/api/chartforgex-core-chartlegendoptions/): Gets the custom entries listed after the series entries.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**item ChartForgeX.Core.ChartLegendItem required**

The item.

Returns

 `ChartLegendOptions` The same instance. 

 `public static ChartLegendOptions Items(ChartLegendOptions chartLegendOptions, IEnumerable<ChartLegendItem> items)` [#](#method-items-chartforgex-core-chartlegendoptions-collections-generic-ienumerable-chartforgex-core-chartlegenditem) 

Adds items to [ChartLegendOptions.Items](/api/chartforgex-core-chartlegendoptions/): Gets the custom entries listed after the series entries.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**items System.Collections.Generic.IEnumerable<ChartForgeX.Core.ChartLegendItem> required**

The items, in order.

Returns

 `ChartLegendOptions` The same instance. 

 `public static ChartLegendOptions KeyShape(ChartLegendOptions chartLegendOptions, ChartLegendKeyShape value)` [#](#method-keyshape-chartforgex-core-chartlegendoptions-chartforgex-core-chartlegendkeyshape) 

Sets [ChartLegendOptions.KeyShape](/api/chartforgex-core-chartlegendoptions/): Gets or sets the key every series entry draws. [ChartLegendKeyShape.Auto](/api/chartforgex-core-chartlegendkeyshape/) keeps the family's own key.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**value ChartForgeX.Core.ChartLegendKeyShape required**

The value.

Returns

 `ChartLegendOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::ChartForgeX.Core.ChartLegendOptions { KeyShape = value };    chartLegendOptions.KeyShape(value);
```

 `public static ChartLegendOptions KeySize(ChartLegendOptions chartLegendOptions, double? value)` [#](#method-keysize-chartforgex-core-chartlegendoptions-nullable-system-double) 

Sets [ChartLegendOptions.KeySize](/api/chartforgex-core-chartlegendoptions/): Gets or sets the key size from 4 through 24 chart pixels, or null for the default ten-pixel key. A line key is 1.4 times as long.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**value double? required**

The value.

Returns

 `ChartLegendOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::ChartForgeX.Core.ChartLegendOptions { KeySize = value };    chartLegendOptions.KeySize(value);
```

 `public static ChartLegendOptions LabelBy(ChartLegendOptions chartLegendOptions, Func<ChartLegendItemContext, string?>? value)` [#](#method-labelby-chartforgex-core-chartlegendoptions-func-chartforgex-core-chartlegenditemcontext-system-string) 

Sets [ChartLegendOptions.ItemFormatter](/api/chartforgex-core-chartlegendoptions/): Gets or sets a formatter that rewrites entry text. A null result keeps the default label.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**value System.Func<ChartForgeX.Core.ChartLegendItemContext, string?>? required**

The callback.

Returns

 `ChartLegendOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                                 // C# fluent
new global::ChartForgeX.Core.ChartLegendOptions { ItemFormatter = value };    chartLegendOptions.LabelBy(value);
```

 `public static ChartLegendOptions MaxHeightFraction(ChartLegendOptions chartLegendOptions, double value)` [#](#method-maxheightfraction-chartforgex-core-chartlegendoptions-double) 

Sets [ChartLegendOptions.MaxHeightFraction](/api/chartforgex-core-chartlegendoptions/): Gets or sets the fraction of chart height available to a legend, including its spacing.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**value double required**

The value.

Returns

 `ChartLegendOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                                     // C# fluent
new global::ChartForgeX.Core.ChartLegendOptions { MaxHeightFraction = value };    chartLegendOptions.MaxHeightFraction(value);
```

 `public static ChartLegendOptions MaxRows(ChartLegendOptions chartLegendOptions, int? value)` [#](#method-maxrows-chartforgex-core-chartlegendoptions-nullable-system-int32) 

Sets [ChartLegendOptions.MaxRows](/api/chartforgex-core-chartlegendoptions/): Gets or sets an additional row limit, including the overflow summary row. Null uses the height budget alone.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**value int? required**

The value.

Returns

 `ChartLegendOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::ChartForgeX.Core.ChartLegendOptions { MaxRows = value };    chartLegendOptions.MaxRows(value);
```

 `public static ChartLegendOptions Position(ChartLegendOptions chartLegendOptions, ChartLegendPosition value)` [#](#method-position-chartforgex-core-chartlegendoptions-chartforgex-core-chartlegendposition) 

Sets [ChartLegendOptions.Position](/api/chartforgex-core-chartlegendoptions/): Gets or sets where the legend is placed relative to the plot area.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**value ChartForgeX.Core.ChartLegendPosition required**

The value.

Returns

 `ChartLegendOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::ChartForgeX.Core.ChartLegendOptions { Position = value };    chartLegendOptions.Position(value);
```

 `public static ChartLegendOptions ShowPoints(ChartLegendOptions chartLegendOptions, bool value = true)` [#](#method-showpoints-chartforgex-core-chartlegendoptions-boolean) 

Sets [ChartLegendOptions.ShowPoints](/api/chartforgex-core-chartlegendoptions/): Gets or sets a value indicating whether capable legends should list individual points instead of series.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `ChartLegendOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                              // C# fluent
new global::ChartForgeX.Core.ChartLegendOptions { ShowPoints = value };    chartLegendOptions.ShowPoints(value);
```

 `public static ChartLegendOptions Visible(ChartLegendOptions chartLegendOptions, bool value = true)` [#](#method-visible-chartforgex-core-chartlegendoptions-boolean) 

Sets [ChartLegendOptions.Visible](/api/chartforgex-core-chartlegendoptions/): Gets or sets whether the legend is enabled. A default legend with one entry is hidden; explicitly assigning true also displays a single entry.

Parameters

**chartLegendOptions ChartForgeX.Core.ChartLegendOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

 `ChartLegendOptions` The same instance. 

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::ChartForgeX.Core.ChartLegendOptions { Visible = value };    chartLegendOptions.Visible(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:0B06611671A900208D5722F29268886D75E063B0220F533EFAA7D506A731D9E7 -->
