Class
ChartCategoryAxisLabels

Configures the appearance and behavior of category axis labels in charts. Controls label formatting, positioning, rotation, and styling for the X-axis categories. Essential for customizing how category names, dates, or values appear along the horizontal axis. Children: ChartCategoryAxisLabelsBorder, ChartCategoryAxisLabelsMargin, ChartCategoryAxisLabelsPadding, ChartCategoryAxisLabelsRotation.

Definition

Constructors

ChartCategoryAxisLabels()

Declaration

cs-api-definition
public ChartCategoryAxisLabels()

Properties

Background

Sets the background color for category axis labels using any valid CSS color. Examples: "#F8F9FA", "rgba(248, 249, 250, 0.8)", "lightgray". Use semi-transparent colors to create subtle label highlighting without blocking chart content. Helps improve label readability when positioned over busy chart backgrounds. When not set, labels have transparent backgrounds.

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

Sets the text color for category axis labels using any valid CSS color. Examples: "#333333", "rgb(51, 51, 51)", "darkblue", "var(--primary-color)". Choose colors that provide sufficient contrast against the chart background for accessibility. Use theme-consistent colors to maintain visual harmony with your application design. When not specified, uses the default theme color for optimal readability.

Declaration

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

Property Value

string

Font

Defines the font styling for category axis labels using standard CSS font syntax. Examples: "14px Arial", "bold 16px 'Segoe UI'", "italic 12px sans-serif". Combine font-weight, font-size, and font-family for complete typography control. Use web-safe fonts or font stacks to ensure consistent rendering across devices. When not specified, inherits font settings from the current theme.

Declaration

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

Property Value

string

Format

Controls how category values are formatted for display using Kendo formatting patterns. Use "{0:yyyy-MM-dd}" for date formatting, "{0:C}" for currency, "{0:P}" for percentages. Examples: "{0:MMM yyyy}" shows "Jan 2023", "{0:F2}" shows "123.45". The placeholder "{0}" represents the category value from your data. Essential for making axis labels user-friendly and properly formatted.

Declaration

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

Property Value

string

Mirror

Flips the position of axis labels to the opposite side of the axis line. When true, labels normally on the left appear on the right, and vice versa. Useful for creating dual-axis layouts or alternative chart arrangements. Helps avoid label overlap when using multiple axes or complex chart configurations. Default false keeps labels in their standard positions.

Declaration

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

Property Value

bool?

Position

Determines where category labels appear relative to the axis line and chart area. OnAxis positions labels directly next to the axis line for standard presentation. End places labels at the end of the crossing axis for alternative layouts. Start positions labels at the start of the crossing axis for custom arrangements. Use with axis crossing configurations to achieve desired label positioning in complex chart layouts.

Declaration

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

Property Value

ChartAxisLabelsPosition?

Skip

Controls how many category labels to skip from the beginning of the axis. Use to reduce label density when categories are too crowded for readability. Examples: 0 shows all labels, 1 skips every other label, 2 skips two then shows one. Combine with Step for advanced label display patterns. Essential for time-series data with many data points where showing every label would overlap.

Declaration

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

Property Value

double?

Step

Controls the interval for rendering labels - shows every nth label for better spacing. Examples: 1 shows every label, 2 shows every second label, 5 shows every fifth label. Use with large datasets to prevent label overcrowding and improve readability. Different from Skip - this creates regular intervals rather than skipping from the start. Essential for charts with many categories where full label display would be illegible.

Declaration

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

Property Value

double?

Template

Defines a custom template for rendering category axis labels with dynamic content. Available fields: "value" (category value), "dataItem" (source data object), "format" (default format), "culture" (localization). Examples: "<strong>#= value #</strong>" for bold labels, conditional formatting based on dataItem properties. Use Kendo template syntax with "#= expression #" for data binding. Enables complex label customization beyond simple formatting for rich data presentation.

Declaration

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

Property Value

string

Visible

Controls whether category axis labels appear in the chart visualization. Set to false to hide labels when categories are self-explanatory or space is limited. Useful for clean, minimalist chart designs or when using custom overlays for category identification. Hidden labels free up space for larger chart plotting area. Default true ensures proper category identification for data interpretation.

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>