Category Axis in React Chart
The Category axis is used to display string-based values (such as names, labels, or categories) instead of numeric or date values. To enable it, set the valueType property to Category in the axis configuration.
Label placement
By default, category labels are positioned between the ticks on the axis. However, you can change their placement to appear directly on the ticks by setting the placement property to OnTicks.
Ranges
You can control which category labels are shown on a chart by setting the following properties in the axis configuration:
minimum: The starting index of the visible categories.maximum: The ending index of the visible categories.interval: The spacing between displayed labels.
This allows you to:
- Limit the visible range to focus on a subset of categories.
- Reduce clutter by skipping labels at regular intervals.
- Improve readability when dealing with large datasets.
Indexed category axis
In a chart, the category axis typically displays labels based on the values in your data source. However, you can choose to render the axis based on the index positions of the data items instead.
To do this, set the indexed property to true in the axis configuration