Class
ChartPlotArea

Defines the visual appearance and layout of the chart's main data plotting area where series data is rendered. Controls background colors, opacity, borders, margins, and padding to create the visual container for chart series. Essential for customizing chart aesthetics and ensuring proper data presentation within the chart layout. Children: ChartPlotAreaBorder, ChartPlotAreaMargin, ChartPlotAreaPadding.

Definition

Constructors

ChartPlotArea()

Declaration

cs-api-definition
public ChartPlotArea()

Properties

Background

Sets the background color of the chart plot area where series data is displayed. Accepts any valid CSS color value including hex (#FF5733), RGB (rgb(255, 87, 51)), named colors (red, blue), or HSL values. Use contrasting colors to ensure data visibility and maintain chart readability.

Declaration

cs-api-definition
[Parameter]
public string Background { get; set; }

Property Value

string

ChildContent

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Opacity

Controls the transparency of the chart plot area background. Values range from 0.0 (completely transparent) to 1.0 (completely opaque). Use values like 0.1-0.3 for subtle transparency effects or 0.8-0.9 for semi-transparent backgrounds that allow underlying elements to show through.

Declaration

cs-api-definition
[Parameter]
public double? Opacity { get; set; }

Property Value

double?

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRender(bool)

Declaration

cs-api-definition
protected override void OnAfterRender(bool firstRender)

Parameters

firstRender

bool

Overrides ComponentBase.OnAfterRender(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides DataVizChildComponent.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Serialize()

Declaration

cs-api-definition
public Dictionary<string, object> Serialize()

Returns

Dictionary<string, object>