ClassChartCategoryAxis
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
ChartCategoryAxis()
Declaration
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
[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
[Parameter]
public string Background { get; set; }
Property Value
BaseUnit
Specifies the base time interval for the axis.
Declaration
[Parameter]
public ChartCategoryAxisBaseUnit? BaseUnit { get; set; }
Property Value
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
[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
[Parameter]
public object[] Categories { get; set; }
Property Value
object[]
ChildContent
The content of the ChartCategoryAxis component. Children: ChartCategoryAxisLabels, ChartCategoryAxisMajorGridLines, ChartCategoryAxisMajorTicks, ChartCategoryAxisMinorGridLines, ChartCategoryAxisMinorTicks, ChartCategoryAxisPlotBands, ChartCategoryAxisTitle, ChartCategoryAxisAutoBaseUnitSteps.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
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.
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.
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
[Parameter]
public double? MaxDateGroups { get; set; }
Property Value
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.
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.
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
[Parameter]
public double? StartAngle { get; set; }
Property Value
Type
Specifies the category axis type.
Declaration
[Parameter]
public ChartCategoryAxisType? Type { get; set; }
Property Value
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.
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
[Parameter]
public double? WeekStartDay { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
Overrides
OnAfterRender(bool)
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
firstRender
Overrides
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides
OnParametersSet()
Declaration
protected override void OnParametersSet()
Overrides