ClassChartLegendLabelsMargin
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
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartLegendLabelsMargin : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartLegendLabelsMargin
Implements:
Inherited Members
Constructors
ChartLegendLabelsMargin()
Declaration
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
[Parameter]
public double? Bottom { get; set; }
Property Value
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
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.
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.
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.
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