ClassChartYAxisLabelsMargin
Configures the external spacing around Y-axis value labels. Provides precise control over label positioning by defining the space between labels and surrounding chart elements like the axis line, plot area, and chart borders. Use this component to ensure proper label placement, prevent overlapping with chart data or other elements, and create professional spacing that enhances readability.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartYAxisLabelsMargin : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartYAxisLabelsMargin
Implements:
Inherited Members
Constructors
ChartYAxisLabelsMargin()
Declaration
public ChartYAxisLabelsMargin()
Properties
Bottom
Sets the bottom margin of Y-axis labels in pixels. Defines the space between the bottom edge of value labels and adjacent chart elements positioned below them. Use this property to prevent label overlap with chart elements and ensure adequate spacing for professional presentation. Particularly important for charts with dense labeling or when labels need clear separation from the chart border.
Declaration
[Parameter]
public double? Bottom { get; set; }
Property Value
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Left
Sets the left margin of Y-axis labels in pixels. Defines the space between the left edge of value labels and adjacent chart elements such as the chart border or legend. Use this property to ensure proper spacing from left-side chart elements and maintain balanced label positioning. Essential for preventing label overlap when charts have tight layouts or when additional left-side spacing is needed.
Right
Sets the right margin of Y-axis labels in pixels. Defines the space between the right edge of value labels and the Y-axis line or plot area. Use this property to ensure adequate spacing between labels and the chart's main data visualization area. Critical for maintaining clean separation between axis labeling and chart data, especially for labels with varying text lengths.
Top
Sets the top margin of Y-axis labels in pixels. Defines the space between the top edge of value labels and adjacent chart elements positioned above them. Use this property to ensure proper separation from chart titles, legend, or other labels positioned above. Important for preventing label overlap in charts with dense vertical layouts or when multiple labeling elements are present.
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