Class
ChartYAxisLabelsMargin

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

Constructors

ChartYAxisLabelsMargin()

Declaration

cs-api-definition
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

cs-api-definition
[Parameter]
public double? Bottom { get; set; }

Property Value

double?

ChildContent

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

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.

Declaration

cs-api-definition
[Parameter]
public double? Left { get; set; }

Property Value

double?

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.

Declaration

cs-api-definition
[Parameter]
public double? Right { get; set; }

Property Value

double?

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.

Declaration

cs-api-definition
[Parameter]
public double? Top { get; set; }

Property Value

double?

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRender(bool)

Declaration

cs-api-definition
protected override void OnAfterRender(bool firstRender)

Parameters

firstRender

bool

Overrides ComponentBase.OnAfterRender(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides DataVizChildComponent.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Serialize()

Declaration

cs-api-definition
public Dictionary<string, object> Serialize()

Returns

Dictionary<string, object>