Class
ChartXAxisTitle

Configures the title text displayed for the X-axis to describe the horizontal data dimension. Provides comprehensive control over title appearance, positioning, and styling to clearly identify what the horizontal axis represents. Use this component to add descriptive labels that help users understand the category, time period, or measurement scale shown on the X-axis.

Definition

Constructors

ChartXAxisTitle()

Declaration

cs-api-definition
public ChartXAxisTitle()

Properties

Background

Specifies the background color of the X-axis title. Accepts any valid CSS color value including hex codes (#F5F5F5), RGB values (rgb(245,245,245)), or color names (whitesmoke). Use this property to create visual emphasis or ensure title readability against varied chart backgrounds. Consider using subtle colors that enhance visibility without overwhelming the chart's main content.

Declaration

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

Property Value

string

ChildContent

Declaration

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

Property Value

RenderFragment

Color

Specifies the text color of the X-axis title. Accepts any valid CSS color value including hex codes (#333333), RGB values (rgb(51,51,51)), or color names (darkgray). Use this property to ensure title text is clearly readable and complements your chart's color scheme. Consider using colors that provide sufficient contrast against the title background for optimal readability.

Declaration

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

Property Value

string

Font

Defines the font style for the X-axis title text. Accepts standard CSS font definitions including size, family, and weight (e.g., "bold 16px Arial", "14px 'Times New Roman'"). Use this property to establish visual hierarchy and ensure title text is appropriately sized for chart readability. Consider using fonts that complement your application's typography while maintaining professional appearance.

Declaration

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

Property Value

string

Position

Specifies the title position.

Declaration

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

Property Value

ChartAxisTitlePosition?

Rotation

Sets the rotation angle for the X-axis title in degrees. Positive values rotate the title clockwise, negative values rotate counter-clockwise. Default is 0 (no rotation). Use rotation when horizontal space is limited or to create unique chart presentations. Common angles include 45, 90, or -45 degrees for improved layout while maintaining title readability.

Declaration

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

Property Value

double?

Text

Sets the text content to display as the X-axis title. Supports plain text strings that describe the data being plotted on the horizontal axis. Use descriptive titles that help users understand the meaning of the X-axis values such as "Time", "Category", or "Date". Clear axis titles improve chart accessibility and make data interpretation more intuitive for viewers.

Declaration

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

Property Value

string

Visible

If set to true the chart will display the scatter chart x axis title. By default the scatter chart x axis title is visible.

Declaration

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

Property Value

bool?

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>