Class
ChartLegendLabelsMargin

Controls the external spacing around legend labels in ChartLegendLabels. Use this component to add space between legend labels and surrounding elements like markers, borders, or other legend components. Proper margins ensure legend text doesn't appear crowded and maintains good readability in various legend layouts and densities.

Definition

Constructors

ChartLegendLabelsMargin()

Declaration

cs-api-definition
public ChartLegendLabelsMargin()

Properties

Bottom

Sets the bottom margin space below legend labels in pixels. Use this to add spacing between labels and chart elements positioned below them, such as the chart area or other legend elements. Common values range from 0-10 pixels to create proper visual separation without excessive spacing that wastes legend area.

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 margin space to the left of legend labels in pixels. Creates spacing between labels and legend markers or borders. Typical values are 2-8 pixels to ensure labels don't appear too close to markers while maintaining efficient use of legend space.

Declaration

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

Property Value

double?

Right

Sets the right margin space to the right of legend labels in pixels. Use this to create separation between labels and the right edge of the legend or other legend elements. Standard values range from 0-8 pixels depending on legend layout and content density.

Declaration

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

Property Value

double?

Top

Sets the top margin space above legend labels in pixels. Creates spacing between labels and chart elements positioned above them, such as legend titles or chart elements. Common values are 0-10 pixels for proper visual hierarchy and readability.

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>