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

Configures the margin spacing around chart value axis labels to control their distance from the axis line and other chart elements. Provides precise control over the empty space surrounding value labels for optimal chart layout and improved readability. Use this component to fine-tune label positioning and ensure proper spacing between value labels and chart content.

Definition

Constructors

C#
public ChartValueAxisLabelsMargin()

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 margin of value axis labels in pixels. Controls the spacing between the labels and elements positioned below them, affecting the overall chart layout and label readability. Use this to create appropriate vertical separation between labels and chart content or other axis elements. Example: Set to 5 for compact layouts, or 15 for more generous spacing when labels need clear separation from chart content.

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

Sets the left margin of value axis labels in pixels. Controls the spacing between the labels and elements to their left, such as the chart plot area or other chart components. Use this to adjust label positioning relative to the value axis line and ensure proper alignment with chart data. Example: Set to 10 to move labels away from the axis line, or 20 for more dramatic spacing in wide chart layouts.

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

Sets the right margin of value axis labels in pixels. Controls the spacing between the labels and elements to their right, ensuring proper visual separation and chart layout balance. Use this to prevent labels from appearing too close to the plot area or overlapping with chart data visualization. Example: Set to 8 for standard spacing, or 25 when working with longer label text that needs additional clearance.

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

Sets the top margin of value axis labels in pixels. Controls the spacing between the labels and elements positioned above them, improving overall chart visual hierarchy. Use this to create proper spacing above value labels and ensure they don't interfere with chart titles or other top-positioned elements. Example: Set to 12 for clear separation from chart headers, or 5 for more compact vertical layouts.

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