Class
ChartCategoryAxisTitle

Configures the title displayed for a category axis in ChartCategoryAxis. Use this component to provide descriptive text that explains what the axis represents, such as "Time Period", "Product Categories", "Geographic Regions", or any contextual information that helps users understand the data being visualized. Titles improve chart accessibility and comprehension by clearly labeling the axis scale and data context. Children: ChartCategoryAxisTitleBorder, ChartCategoryAxisTitleMargin, ChartCategoryAxisTitlePadding.

Definition

Constructors

ChartCategoryAxisTitle()

Declaration

cs-api-definition
public ChartCategoryAxisTitle()

Properties

Background

Sets the background color behind the category axis title. Accepts any valid CSS color including hex codes (#F8F9FA), RGB values (rgb(248,249,250)), named colors (whitesmoke), or HSL values. Use background colors to improve title readability against complex chart backgrounds or to create visual emphasis for important axis information.

Declaration

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

Property Value

string

ChildContent

The content of the ChartCategoryAxisTitle component. Children: ChartCategoryAxisTitleBorder, ChartCategoryAxisTitleMargin, ChartCategoryAxisTitlePadding.

Declaration

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

Property Value

RenderFragment

Color

Sets the text color of the category axis title. Accepts any valid CSS color including hex codes (#212529), RGB values (rgb(33,37,41)), named colors (darkslategray), or HSL values. Choose colors that provide good contrast with the Background and chart theme for optimal readability and professional appearance.

Declaration

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

Property Value

string

Font

Defines the font styling for the category axis title using CSS font notation. Specify properties like size, weight, and family in a single string, for example: "bold 16px Arial", "italic 14px 'Times New Roman'", or "normal 18px sans-serif". Title fonts are typically larger and bolder than axis labels to establish visual hierarchy.

Declaration

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

Property Value

string

Position

Controls the positioning of the category axis title using ChartAxisTitlePosition values. Determines where the title appears relative to the axis: typically above or below for horizontal category axes. This affects the overall chart layout and ensures the title doesn't interfere with data visualization or other chart elements.

Declaration

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

Property Value

ChartAxisTitlePosition?

Rotation

Sets the rotation angle for the category axis title in degrees. Use positive values for clockwise rotation, negative values for counter-clockwise rotation, or 0 (default) for no rotation. Common angles include 90 degrees for vertical titles on horizontal axes, or custom angles for artistic layouts.

Declaration

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

Property Value

double?

Text

Specifies the text content displayed as the category axis title. Use descriptive text that explains what the axis represents, such as "Time Period", "Product Categories", "Months", or "Geographic Regions". Clear, informative titles help users understand the data context and improve chart accessibility.

Declaration

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

Property Value

string

Visible

Controls whether the category axis title is displayed. Set to true (default) to show the title with its descriptive text, or false to hide it for cleaner chart appearance. Visible titles improve chart comprehension by providing context about the data being displayed on the axis.

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>