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:
public class ChartCategoryAxis : DataVizCollectionItemComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentDataVizCollectionItemComponentChartCategoryAxis
Implements:
Inherited Members
Constructors
public ChartCategoryAxis()
Properties
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.
[Parameter]
public object[] AxisCrossingValue { get; set; }
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.
[Parameter]
public string Background { get; set; }
Specifies the base time interval for the axis.
[Parameter]
public ChartCategoryAxisBaseUnit? BaseUnit { get; set; }
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.
[Parameter]
public int? BaseUnitStep { get; set; }
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.
[Parameter]
public object[] Categories { get; set; }
The content of the ChartCategoryAxis component. Children: ChartCategoryAxisLabels, ChartCategoryAxisMajorGridLines, ChartCategoryAxisMajorTicks, ChartCategoryAxisMinorGridLines, ChartCategoryAxisMinorTicks, ChartCategoryAxisPlotBands, ChartCategoryAxisTitle, ChartCategoryAxisAutoBaseUnitSteps.
[Parameter]
public RenderFragment ChildContent { get; set; }
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.
[Parameter]
public string Color { get; set; }
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.
[Parameter]
public object Max { get; set; }
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.
[Parameter]
public double? MaxDateGroups { get; set; }
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.
[Parameter]
public object Min { get; set; }
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.
[Parameter]
public string Name { get; set; }
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.
[Parameter]
public double? StartAngle { get; set; }
Specifies the category axis type.
[Parameter]
public ChartCategoryAxisType? Type { get; set; }
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.
[Parameter]
public bool? Visible { get; set; }
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.
[Parameter]
public double? WeekStartDay { get; set; }
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
protected override void OnInitialized()
Overrides:
protected override void OnParametersSet()
Overrides: