Category axis in JavaScript Chart control
18 Nov 20181 minute to read
The category axis is used to represent string-based values instead of numeric values. It is commonly used for displaying discrete categories such as names, labels, or textual groupings along an axis.
Note: To use the category axis, inject
Categorymodule usingChart.Inject(Category)method and set thevalueTypeproperty of the axis toCategory.
Labels Placement
By default, category labels are positioned between the axis tick marks. They can also be aligned directly on the ticks by using the labelPlacement property.
Range
The visible range of the category axis can be customized by using the minimum, maximum, and interval properties of the axis. These properties control the start value, end value, and spacing between category labels.
Indexed category axis
The category axis can also be rendered based on the index values of the data source. This behavior can be enabled by setting the isIndexed property of the axis to true, which positions data points according to their index instead of their actual category values.