Class
ChartLegendPadding

Controls the internal spacing within the entire chart legend in ChartLegend. Use this component to add space between the legend content and the legend background or border edges. Padding improves legend content readability and visual appearance, especially when legends have background colors, borders, or custom styling that requires proper content spacing for professional presentation.

Definition

Constructors

ChartLegendPadding()

Declaration

cs-api-definition
public ChartLegendPadding()

Properties

Bottom

Sets the bottom padding space inside the entire chart legend in pixels. This creates internal spacing between the legend content and the bottom edge of the legend background or border. Use values like 5-15 pixels to improve legend content readability and visual appearance, especially when legends have backgrounds or borders.

Declaration

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

Property Value

double?

ChildContent

Declaration

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

Property Value

RenderFragment

Left

Sets the left padding space inside the entire chart legend in pixels. Creates internal spacing between the legend content and the left edge of the legend background or border. Common values are 5-15 pixels to ensure legend items don't touch legend boundaries and maintain proper readability within the legend container.

Declaration

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

Property Value

double?

Right

Sets the right padding space inside the entire chart legend in pixels. This creates internal spacing between the legend content and the right edge of the legend background or border. Use values like 5-15 pixels to provide proper content spacing, especially important for legends with background colors or borders.

Declaration

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

Property Value

double?

Top

Sets the top padding space inside the entire chart legend in pixels. Creates internal spacing between the legend content and the top edge of the legend background or border. Standard values range from 5-15 pixels to improve content presentation and prevent legend items from touching legend boundaries.

Declaration

cs-api-definition
[Parameter]
public double? Top { 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>