Class
ChartXAxisLine

Configures the main horizontal line of the chart X-axis that serves as the foundation for category positioning and visual reference. Provides comprehensive control over axis line appearance including color, style, thickness, and visibility to create professional chart presentations. Use this component to customize the primary horizontal axis line that defines the bottom or top boundary of your chart's data area.

Definition

Constructors

ChartXAxisLine()

Declaration

cs-api-definition
public ChartXAxisLine()

Properties

ChildContent

Declaration

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

Property Value

RenderFragment

Color

Sets the color of the main X-axis line that runs horizontally across the chart. Accepts any valid CSS color value including hex codes (#333333), RGB values (rgb(51,51,51)), or color names (black). Use this to ensure the axis line has appropriate contrast and visibility against your chart's background and complements the overall design. Example: Set to "#666666" for a professional gray axis line, or "#2c3e50" for a darker, more prominent horizontal reference.

Declaration

cs-api-definition
[Parameter]
public string Color { get; set; }

Property Value

string

DashType

Sets the dash pattern style for the main X-axis line. Controls the visual appearance of the horizontal axis line, allowing for solid lines or various dashed patterns to create different design effects. Use this to create distinctive axis styles that complement your chart design or match your application's visual language. Accepts values from the DashType enumeration including solid, dash, dot, and various dash-dot combinations.

Declaration

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

Property Value

DashType?

Visible

Controls whether the main X-axis line is displayed on the chart. When set to true, the horizontal axis line appears to provide visual reference for category positioning. When false, the line is hidden. Use this to show or hide the axis line based on chart design preferences and the need for visual reference elements. Example: Set to true for charts requiring clear axis definition, or false for minimal designs where the axis line might be unnecessary.

Declaration

cs-api-definition
[Parameter]
public bool? Visible { get; set; }

Property Value

bool?

Width

Sets the thickness of the main X-axis line in pixels. Controls how prominent the horizontal axis line appears and also affects the visual weight of associated major and minor ticks. Use this to create subtle axis lines with thin widths or bold axis definitions with thicker lines based on your chart's visual hierarchy. Example: Set to 1 for standard axis lines, 2 for more prominent axis definition, or 0.5 for subtle axis references.

Declaration

cs-api-definition
[Parameter]
public double? Width { 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>