Class
ChartCategoryAxis

Defines and configures a category axis for chart data categorization and labeling. Controls how categorical data (names, dates, groups) appears along the X-axis. Essential for charts that display data across categories, time periods, or discrete groups. Supports multiple category axes for complex data visualization scenarios. Children: ChartCategoryAxisLabels, ChartCategoryAxisMajorGridLines, ChartCategoryAxisMajorTicks, ChartCategoryAxisMinorGridLines, ChartCategoryAxisMinorTicks, ChartCategoryAxisPlotBands, ChartCategoryAxisTitle, ChartCategoryAxisAutoBaseUnitSteps.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class ChartCategoryAxis : DataVizCollectionItemComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseDataVizChildComponentDataVizCollectionItemComponentChartCategoryAxis

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members ComponentBase.OnInitializedAsync()ComponentBase.OnParametersSetAsync()ComponentBase.StateHasChanged()ComponentBase.ShouldRender()ComponentBase.OnAfterRenderAsync(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)

Constructors

ChartCategoryAxis()

Declaration

cs-api-definition
public ChartCategoryAxis()

Properties

AxisCrossingValue

Defines where value axes intersect this category axis using category indices or values. For single intersection: use array with one element like [3] to cross at 4th category. For multiple value axes: use array with multiple elements like [2, 5, 8] for different crossing points. Essential for charts with multiple value axes to control visual layout and data presentation. Use with multi-axis scenarios to position value axes at meaningful category points.

Declaration

cs-api-definition
[Parameter]
public object[] AxisCrossingValue { get; set; }

Property Value

object[]

Background

Sets the background color for the entire category axis area using any valid CSS color. Examples: "#F8F9FA", "rgba(248, 249, 250, 0.5)", "lightgray". Helps distinguish the axis area from the chart plotting region. Use subtle colors to avoid overpowering the chart data visualization. When not specified, the axis remains transparent allowing chart content to show through.

Declaration

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

Property Value

string

BaseUnit

Specifies the base time interval for the axis.

Declaration

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

Property Value

ChartCategoryAxisBaseUnit?

BaseUnitStep

Controls the interval between categories in base units for time-based axes. Use integers like 1, 2, 7 to control grouping intervals (days, weeks, months). Set to "auto" to automatically calculate optimal intervals based on MaxDateGroups. Only applies when BaseUnit is configured for time-based categorization. Essential for controlling time-series data density and readability.

Declaration

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

Property Value

int?

Categories

Provides explicit category names when not using data-driven categorization. Use for fixed categories like ["Q1", "Q2", "Q3", "Q4"] or ["Red", "Blue", "Green"]. Alternative to field-based categories when you need specific category ordering or naming. Each array item becomes a category label on the axis. Essential for charts where categories don't directly correspond to data object properties.

Declaration

cs-api-definition
[Parameter]
public object[] Categories { get; set; }

Property Value

object[]

ChildContent

Declaration

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

Property Value

RenderFragment

Color

Sets the default color for all category axis elements using any valid CSS color. Examples: "#666666", "rgb(102, 102, 102)", "darkgray". Applies to axis lines, ticks, and labels unless overridden by specific component colors. Use Color or line colors for individual element styling. Ensures consistent color theme across all axis visual elements.

Declaration

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

Property Value

string

Max

Sets the maximum date value displayed on time-based category axes. Use DateTime objects or date strings to define the axis end point. Examples: DateTime(2023, 12, 31) or "2023-12-31" for yearly ranges. Works with Min to create fixed date ranges independent of data. Essential for consistent time-series visualization when data doesn't cover full periods.

Declaration

cs-api-definition
[Parameter]
public object Max { get; set; }

Property Value

object

MaxDateGroups

Limits the maximum number of category groups when using automatic base unit optimization. Only applies when BaseUnit is "fit" or BaseUnitStep is "auto". Examples: 10 for sparse grouping, 50 for detailed grouping, 100 for high-density data. Prevents overcrowding in time-series charts by intelligently grouping categories. Balances detail level with readability for optimal user experience.

Declaration

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

Property Value

double?

Min

Sets the minimum date value displayed on time-based category axes. Use DateTime objects or date strings to define the axis start point. Examples: DateTime(2023, 1, 1) or "2023-01-01" for yearly ranges. Works with Max to create fixed date ranges independent of data. Essential for consistent time-series visualization when data doesn't cover full periods.

Declaration

cs-api-definition
[Parameter]
public object Min { get; set; }

Property Value

object

Name

Assigns a unique identifier to this category axis for series association and multi-axis scenarios. Reference this name in CategoryAxis to bind series to specific axes. Examples: "PrimaryCategories", "TimeAxis", "ProductGroups". Essential for charts with multiple category axes showing different categorization schemes. Must be unique across all category axes in the same chart.

Declaration

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

Property Value

string

StartAngle

Sets the starting angle for the first category in polar chart types. Measured in degrees where 0 points left, positive values rotate clockwise. Examples: 0 starts from left, 90 from top, 180 from right, 270 from bottom. Negative values like -45 rotate counter-clockwise from the left position. Only applies to polar, radar, and circular chart visualizations.

Declaration

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

Property Value

double?

Type

Specifies the category axis type.

Declaration

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

Property Value

ChartCategoryAxisType?

Visible

Controls whether this category axis appears in the chart visualization. Set to false to hide the axis while keeping its data categorization functionality. Useful for clean, minimalist chart designs or when axis information is conveyed elsewhere. Hidden axes still function for data positioning but don't render visual elements. Default true ensures proper category identification and chart interpretation.

Declaration

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

Property Value

bool?

WeekStartDay

Defines which day starts the week when using weekly base units for time-based categorization. Only applies when BaseUnit is set to weeks for time-series data. Use 0 for Sunday, 1 for Monday, 2 for Tuesday, through 6 for Saturday. Essential for proper week boundary calculation in business and international contexts. Affects how weekly data groups are formed and displayed on the axis.

Declaration

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

Dispose(bool)

Declaration

cs-api-definition
protected override void Dispose(bool disposing)

Parameters

disposing

bool

Overrides DataVizChildComponent.Dispose(bool)

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()