ClassChartLegendLabelsPadding
Controls the internal spacing within legend labels in ChartLegendLabels. Use this component to add space between the label text and the label background or border edges. Padding improves text readability and visual appearance, especially when legend labels have background colors, borders, or custom styling that requires proper text spacing.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartLegendLabelsPadding : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartLegendLabelsPadding
Implements:
Inherited Members
Constructors
ChartLegendLabelsPadding()
Declaration
public ChartLegendLabelsPadding()
Properties
Bottom
Sets the bottom padding space inside legend labels in pixels. This creates internal spacing between the label text and the bottom edge of the label background. Use values like 2-6 pixels to improve text readability and visual appearance, especially when labels have backgrounds or borders.
Declaration
[Parameter]
public double? Bottom { get; set; }
Property Value
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Left
Sets the left padding space inside legend labels in pixels. Creates internal spacing between the label text and the left edge of the label background. Common values are 2-6 pixels to ensure text doesn't touch label boundaries and maintains proper readability within the legend context.
Right
Sets the right padding space inside legend labels in pixels. This creates internal spacing between the label text and the right edge of the label background. Use values like 2-6 pixels to provide proper text spacing, especially important for labels with background colors or borders.
Top
Sets the top padding space inside legend labels in pixels. Creates internal spacing between the label text and the top edge of the label background. Standard values range from 2-6 pixels to improve text presentation and prevent text from touching label boundaries in legend layouts.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
OnAfterRender(bool)
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
firstRender
Overrides
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides
OnParametersSet()
Declaration
protected override void OnParametersSet()
Overrides
Serialize()
Declaration
public Dictionary<string, object> Serialize()
Returns