ClassChartLegendPadding
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
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartLegendPadding : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartLegendPadding
Implements:
Inherited Members
Constructors
ChartLegendPadding()
Declaration
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
[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 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.
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.
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.
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