Class
ChartXAxisLabelsMargin

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

Definition

Constructors

ChartXAxisLabelsMargin()

Declaration

cs-api-definition
public ChartXAxisLabelsMargin()

Properties

Bottom

Sets the bottom margin of X-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 category labels and chart content or container boundaries. Example: Set to 8 for standard spacing, or 15 for more generous separation when labels need clear distance from chart edges.

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 X-axis labels in pixels. Controls the spacing between the labels and elements to their left, ensuring proper horizontal alignment and chart layout balance. Use this to adjust label positioning relative to the chart's left edge or prevent overlapping with other chart components. Example: Set to 5 for compact layouts, or 12 when labels need additional clearance from chart boundaries or adjacent elements.

Declaration

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

Property Value

double?

Right

Sets the right margin of X-axis labels in pixels. Controls the spacing between the labels and elements to their right, ensuring proper visual separation and chart layout. Use this to prevent labels from appearing too close to the chart's right edge or overlapping with chart data visualization. Example: Set to 6 for standard spacing, or 18 when working with longer category names that need additional clearance.

Declaration

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

Property Value

double?

Top

Sets the top margin of X-axis labels in pixels. Controls the spacing between the labels and elements positioned above them, such as the chart plot area or axis line. Use this to create proper spacing above category labels and ensure they don't interfere with chart data or axis elements. Example: Set to 10 to move labels away from the axis line, or 20 for more dramatic spacing in charts with dense data.

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>