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
public ChartLegendLabelsMargin()
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
protected override void OnInitialized()
Overrides:
protected override void OnParametersSet()
Overrides:
Properties
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.
[Parameter]
public double? Bottom { get; set; }
[Parameter]
public RenderFragment ChildContent { get; set; }
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.
[Parameter]
public double? Left { get; set; }
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.
[Parameter]
public double? Right { get; set; }
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.
[Parameter]
public double? Top { get; set; }