New to Telerik UI for BlazorStart a free 30-day trial

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

C#
public ChartLegendPadding()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
protected override void OnAfterRender(bool firstRender)
Parameters:firstRenderbool

Overrides: ComponentBase.OnAfterRender(bool)

C#
protected override void OnInitialized()

Overrides: DataVizChildComponent.OnInitialized()

C#
protected override void OnParametersSet()

Overrides: ComponentBase.OnParametersSet()

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>

Properties

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.

C#
[Parameter]
public double? Bottom { get; set; }
C#
[Parameter]
public RenderFragment ChildContent { get; set; }

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.

C#
[Parameter]
public double? Left { get; set; }

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.

C#
[Parameter]
public double? Right { get; set; }

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.

C#
[Parameter]
public double? Top { get; set; }