# ChartPlotRegion

A passive, solid background rectangle bounded by Cartesian data coordinates.

 Class  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[ChartPlotRegion.cs:24](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L24)

**Modifiers**

sealed

A passive, solid background rectangle bounded by Cartesian data coordinates.

## Inheritance

- object
- ChartPlotRegion

## Remarks

Null bounds use the final axis domain. Regions never expand that domain. Reversal changes their painted position without changing authored bounds. Time coordinates use OLE Automation dates. Bounds follow physical X and Y: horizontal charts use value coordinates for X and linear category slots for Y.

## Usage

 Explore 8 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 3

- Property [Chart.PlotRegions](/api/chartforgex-core-chart/#property-plotregions)
- Method [ChartPlotRegion.WithBorder](/api/chartforgex-core-chartplotregion/#method-withborder-chartforgex-core-chartstrokestyle)
- Method [ChartPlotRegion.WithLabelPosition](/api/chartforgex-core-chartplotregion/#method-withlabelposition-chartforgex-core-chartplotregionlabelposition)

### Accepted by parameters 5

- Extension method [Chart.PlotRegion](/api/chartforgex-core-chart/#extension-plotregion-chartforgex-core-chart-chartforgex-core-chartplotregion) parameter `item`
- Extension method [Chart.PlotRegions](/api/chartforgex-core-chart/#extension-plotregions-chartforgex-core-chart-collections-generic-ienumerable-chartforgex-core-chartplotregion) parameter `items`
- Method [Chart.AddPlotRegion](/api/chartforgex-core-chart/#method-addplotregion-chartforgex-core-chartplotregion) parameter `region`
- Method [ChartFluent.PlotRegion](/api/chartforgex-core-chartfluent/#method-plotregion-chartforgex-core-chart-chartforgex-core-chartplotregion) parameter `item`
- Method [ChartFluent.PlotRegions](/api/chartforgex-core-chartfluent/#method-plotregions-chartforgex-core-chart-collections-generic-ienumerable-chartforgex-core-chartplotregion) parameter `items`

 Filter members   

    Show inherited   

 

## Constructors

 ChartPlotRegion 2 overloads 

 `public ChartPlotRegion(int paletteIndex, double? xMinimum = null, double? xMaximum = null, double? yMinimum = null, double? yMaximum = null, string label = "", double opacity = 0.14, ChartAxisSide yAxis = Primary, bool showLabel = true)` [#](#constructor-ctor-int32-nullable-system-double-nullable-system-double-nullable-system-double-nullable-system-double-string-double-chartforgex-core-chartaxisside-boolean) 

[ChartPlotRegion.cs:24](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L24)

Creates a region whose color follows the active render theme's categorical palette.

Parameters

**paletteIndex int required**

The zero-based palette index. Larger indices wrap to the active palette length.

**xMinimum double? = null optional**

The inclusive lower X bound, or null for the domain minimum.

**xMaximum double? = null optional**

The inclusive upper X bound, or null for the domain maximum.

**yMinimum double? = null optional**

The inclusive lower Y bound, or null for the domain minimum.

**yMaximum double? = null optional**

The inclusive upper Y bound, or null for the domain maximum.

**label string = "" optional**

An optional interior caption retained in semantic metadata.

**opacity double = 0.14 optional**

The fill opacity from zero through one.

**yAxis ChartForgeX.Core.ChartAxisSide = Primary optional**

The Y axis that owns the region's coordinates.

**showLabel bool = true optional**

Whether to paint the caption when it fits within the visible region.

 `public ChartPlotRegion(ChartColor color, double? xMinimum = null, double? xMaximum = null, double? yMinimum = null, double? yMaximum = null, string label = "", double opacity = 0.14, ChartAxisSide yAxis = Primary, bool showLabel = true)` [#](#constructor-ctor-chartforgex-primitives-chartcolor-nullable-system-double-nullable-system-double-nullable-system-double-nullable-system-double-string-double-chartforgex-core-chartaxisside-boolean) 

[ChartPlotRegion.cs:40](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L40)

Creates a region. A missing bound extends to that end of the selected axis domain.

Parameters

**color ChartForgeX.Primitives.ChartColor required**

The solid background color.

**xMinimum double? = null optional**

The inclusive lower X bound, or null for the domain minimum.

**xMaximum double? = null optional**

The inclusive upper X bound, or null for the domain maximum.

**yMinimum double? = null optional**

The inclusive lower Y bound, or null for the domain minimum.

**yMaximum double? = null optional**

The inclusive upper Y bound, or null for the domain maximum.

**label string = "" optional**

An optional interior caption retained in semantic metadata.

**opacity double = 0.14 optional**

The fill opacity from zero through one.

**yAxis ChartForgeX.Core.ChartAxisSide = Primary optional**

The Y axis that owns the region's coordinates.

**showLabel bool = true optional**

Whether to paint the caption when it fits within the visible region.

## Methods

 `public ChartPlotRegion WithBorder(ChartStrokeStyle? border)` [#](#method-withborder-chartforgex-core-chartstrokestyle) 

[ChartPlotRegion.cs:81](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L81)

Returns a detached definition with the supplied border; null removes the border.

Parameters

**border ChartForgeX.Core.ChartStrokeStyle? required**

Immutable color, opacity, width and dash overrides.

Returns

 `ChartPlotRegion` A new region preserving every authored bound, fill and caption. 

 `public ChartPlotRegion WithLabelPosition(ChartPlotRegionLabelPosition position)` [#](#method-withlabelposition-chartforgex-core-chartplotregionlabelposition) 

[ChartPlotRegion.cs:87](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L87)

Returns a detached definition with one deliberate caption anchor.

Parameters

**position ChartForgeX.Core.ChartPlotRegionLabelPosition required**

The screen-relative anchor inside the clipped region. Explicit anchors shorten or omit rather than relocate.

Returns

 `ChartPlotRegion` A new region preserving every authored bound, fill and border. 

## 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 ChartColor? Color { get; }` [#](#property-color) 

[ChartPlotRegion.cs:52](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L52)

Gets the authored literal fill color, or null when [ChartPlotRegion.PaletteIndex](/api/chartforgex-core-chartplotregion/) selects a theme color.

 `public int? PaletteIndex { get; }` [#](#property-paletteindex) 

[ChartPlotRegion.cs:54](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L54)

Gets the categorical palette index resolved at preparation, or null for a literal color.

 `public double? XMinimum { get; }` [#](#property-xminimum) 

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

Gets the authored lower X bound, or null for the domain minimum.

 `public double? XMaximum { get; }` [#](#property-xmaximum) 

[ChartPlotRegion.cs:58](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L58)

Gets the authored upper X bound, or null for the domain maximum.

 `public double? YMinimum { get; }` [#](#property-yminimum) 

[ChartPlotRegion.cs:60](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L60)

Gets the authored lower Y bound, or null for the domain minimum.

 `public double? YMaximum { get; }` [#](#property-ymaximum) 

[ChartPlotRegion.cs:62](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L62)

Gets the authored upper Y bound, or null for the domain maximum.

 `public string Label { get; }` [#](#property-label) 

[ChartPlotRegion.cs:64](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L64)

Gets the original caption, including when hidden, shortened or outside the domain.

 `public double Opacity { get; }` [#](#property-opacity) 

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

Gets the fill opacity.

 `public ChartAxisSide YAxis { get; }` [#](#property-yaxis) 

[ChartPlotRegion.cs:68](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L68)

Gets the Y axis that owns these data coordinates.

 `public bool ShowLabel { get; }` [#](#property-showlabel) 

[ChartPlotRegion.cs:70](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L70)

Gets whether to paint an interior caption when space permits.

 `public ChartStrokeStyle? Border { get; }` [#](#property-border) 

[ChartPlotRegion.cs:74](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L74)

Gets an immutable border override, or null for no border. A missing color or width uses the theme axis stroke.

 `public ChartPlotRegionLabelPosition LabelPosition { get; }` [#](#property-labelposition) 

[ChartPlotRegion.cs:76](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/ChartPlotRegion.cs#L76)

Gets the screen-relative caption anchor. Auto retains center-first collision-aware placement.

<!-- PowerForge markdown artifact sha256:055B4C28F1B476FB7435C6DFDE08A1CAB07871FD2E9DA0C3B0B992AF7B8BA40B -->
